You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR has two components:
### Fixing the Race Condition b/w Object Eviction and Repining for
Object Recovery
The sequence of events documents the life of an object called A.
1. Owner sends object eviction notifications to all locations as part of
Object A going out of scope. (done through worker<->worker pubsub)
2. Workers that have a copy of Object A mark it for asynchronous
deletion.
3. Owner decides to recover the object and repin a copy of object A that
has already been marked for asynchronous deletion.
4. Owner submits a task that has Object A as an argument.
5. The task executor tries to fetch Object A and the pull manager hangs
forever.
The fix is to check to see if an object is pending deletion before
pinning it. If it is, the owner cannot pin the object and has to either
try a different location or trigger reconstruction by resubmitting the
task that created the object.
### (The Joys of) Writing a Unit Test in Node Manager
There are a few problems with writing unit tests in the NodeManager
1. Despite heroics from @rueian and @dayshah recently, the NodeManager
still had a few dependencies that needed to be put behind interfaces so
fakes could be injected.
2. The gRPC handlers are all private to the class so they cannot be
called directly. Instead the unit tests need to create a gRPC client.
3. The NodeManager has a lot of dependencies and the dependencies have
interdependencies so we currently dedicate 200 lines to constructing a
test fixture.
4. There is a lack of usable fakes e.g. for the PlasmaClient for writing
unit tests.
### Follow Ups
1. Create a shim between the NodeManager and it's gRPC handlers so they
can be unit tested directly without creating gRPC clients.
2. Create a utility function that lets you construct a NodeManager for
testing optionally overriding interesting dependencies (otherwise they
will default to a Noop fake).
3. Move the fakes created in this PR into their own (more complete
implementations).
4. Create a Fake for SubscriberInterface.
---------
Signed-off-by: irabbani <[email protected]>
Signed-off-by: Ibrahim Rabbani <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
0 commit comments