Skip to content

Commit ffe0be8

Browse files
committed
Describe revertable suspended actors as having a node-local snapshot
RevertActor accepts a SUSPENDED actor whenever its latest snapshot still has a node-local copy, including after the upload to storage completed but before atelet deleted the local copy. Match the RPC, kubectl help, and README wording to that check and to the FailedPrecondition message, and explain why a suspended actor without a node-local snapshot is rejected: it is already at its durable snapshot, so there is nothing to revert.
1 parent 50e3516 commit ffe0be8

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

‎cmd/kubectl-ate/README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ kubectl ate suspend actor my-actor -a <atespace>
208208
# Suspend an actor and wait for its snapshot to reach storage.
209209
kubectl ate suspend actor my-actor -a <atespace> --mode=sync
210210

211-
# Revert an actor to its last external snapshot (discards live, crashed, or not-yet-uploaded suspended state and returns to SUSPENDED)
211+
# Revert an actor to its last external snapshot (discards live or crashed state, or suspended state with a node-local snapshot, and returns to SUSPENDED)
212+
# A suspended actor without a node-local snapshot is already at its external snapshot, so it cannot be reverted
212213
kubectl ate revert actor my-actor -a <atespace>
213214

214215
# Delete an actor (by default, requires the actor to be SUSPENDED or CRASHED).

‎cmd/kubectl-ate/internal/cmd/revert_actor.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ var revertActorCmd = &cobra.Command{
3131
Long: `Revert an actor to SUSPENDED, discarding its current execution.
3232
3333
The actor's external snapshot is left untouched, so a later resume restores
34-
from it. Only crashed or running actors, or suspended actors whose snapshot
35-
has not reached storage yet, can be reverted.`,
34+
from it. Only crashed or running actors, or suspended actors with a node-local
35+
snapshot, can be reverted. A suspended actor without a node-local snapshot is
36+
already at its durable snapshot, so there is nothing to revert.`,
3637
Args: exactlyOneArg("<actor-name>", "atespace"),
3738
RunE: func(cmd *cobra.Command, args []string) error {
3839
ctx := cmd.Context()

‎pkg/proto/ateapipb/ateapi.proto‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ service Control {
5050
}
5151

5252
// Revert an actor to SUSPENDED state at its durable snapshot.
53-
// Only crashed or running actors, or suspended actors whose snapshot has
54-
// not reached storage yet, can be reverted.
53+
// Only crashed or running actors, or suspended actors with a node-local
54+
// snapshot, can be reverted. A suspended actor without a node-local snapshot
55+
// is already at its durable snapshot, so there is nothing to revert.
5556
rpc RevertActor(RevertActorRequest) returns (RevertActorResponse) {
5657
option (method).resource = "Actor";
5758
}

‎pkg/proto/ateapipb/ateapi_grpc.pb.go‎

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)