Once events or snapshots have been deleted, a rollback to a timestamp that requires such deleted events or snapshots is impossible. The rollback tool can't detect such deletions yet. If such a timestamp is specified, the rollback tool will delete all events and snapshots of the target Raft shard (or persistent actors of the target Raft shard will be inconsistent state).
The rollback tool can return a failure in rollback preparations (RaftShardRollback.prepareRollback) to address this issue. The tool first finds a sequence number for the rollback timestamp, and then it has a chance to verify the sequence number is valid for a rollback. In the verification, the tool should determine whether a persistent actor can roll back to the sequence number.
For #201, #204
Once events or snapshots have been deleted, a rollback to a timestamp that requires such deleted events or snapshots is impossible. The rollback tool can't detect such deletions yet. If such a timestamp is specified, the rollback tool will delete all events and snapshots of the target Raft shard (or persistent actors of the target Raft shard will be inconsistent state).
The rollback tool can return a failure in rollback preparations (
RaftShardRollback.prepareRollback
) to address this issue. The tool first finds a sequence number for the rollback timestamp, and then it has a chance to verify the sequence number is valid for a rollback. In the verification, the tool should determine whether a persistent actor can roll back to the sequence number.Related code
RaftShardRollback.prepareRollback
: https://github.com/lerna-stack/akka-entity-replication/blob/v2.2.0/rollback-tool-cassandra/src/main/scala/lerna/akka/entityreplication/rollback/RaftShardRollback.scala#L29-L50RaftShardRollback.prepareRaftActorsRollback
: https://github.com/lerna-stack/akka-entity-replication/blob/v2.2.0/rollback-tool-cassandra/src/main/scala/lerna/akka/entityreplication/rollback/RaftShardRollback.scala#L52-L75RaftShardRollback.prepareSnapshotStoresRollback
: https://github.com/lerna-stack/akka-entity-replication/blob/v2.2.0/rollback-tool-cassandra/src/main/scala/lerna/akka/entityreplication/rollback/RaftShardRollback.scala#L77-L113RaftShardRollback.prepareSnapshotSyncManagersRollback
: https://github.com/lerna-stack/akka-entity-replication/blob/v2.2.0/rollback-tool-cassandra/src/main/scala/lerna/akka/entityreplication/rollback/RaftShardRollback.scala#L115-L141RaftShardRollback.prepareCommitLogStoreActorRollback
: https://github.com/lerna-stack/akka-entity-replication/blob/v2.2.0/rollback-tool-cassandra/src/main/scala/lerna/akka/entityreplication/rollback/RaftShardRollback.scala#L143-L187