atelet: serialize node-local operations per actor - #1137
atelet: serialize node-local operations per actor#1137Troy Chiu (troychiu) wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
90dda34 to
fd1533d
Compare
9b5ea13 to
5f06808
Compare
5f06808 to
afad210
Compare
| "google.golang.org/grpc/status" | ||
| ) | ||
|
|
||
| // actorLocks serializes concurrent node-local operations for the same actor. |
There was a problem hiding this comment.
Do we need this given that the ate apiserver already holds a global lock per actor before each Actor operation?
There was a problem hiding this comment.
I think it's still needed.
If an ateapi request cancels or times out, ateapi exits and releases the distributed lock. However, the in-flight gRPC call on atelet may still be running or unwinding. If a retry arrives immediately, ateapi re-acquires the lock and issues a second RPC to atelet, resulting in concurrent operations interfering with the actor's local state.
Towards #372
Serializes node-local operations (Run, Checkpoint, UploadPausedCheckpoint, Restore, Terminate) on a per-actor basis in atelet to prevent concurrent operations from interfering with each other's on-disk state (e.g. reading or wiping checkpoint directories concurrently).