Description
Motivation
General context is available in the IGNITE-21881. Within given ticket it's required to persist and restore idempotent command cache in order to return original command result after raft node restart.
Definition of Done
- Original command result is returned after raft node restart.
Implementation Notes
Seems that the easiest way to implement the desired solution and get all snapshot consistency aspects out of the box is to store each idempotent cache entry in dedicated MS key where key itself will be <idempotentCommandCachePrefix>commandId with the original command result as value. I don't think that we need to persist command startTime, we may recalculate it on cache initialisation - it's all matter of optimisation and not correctness. Meaning that it's safe to have value in cache a little bit longer than it's actually required.
The only non-trivial part here is to consistently update storage with both command specific keys and idempotent cache meta ones.
Attachments
Issue Links
- blocks
-
IGNITE-22217 Meta storage idempotent invokes: implement idempotent cache cleanup logic
- Resolved
- is blocked by
-
IGNITE-21881 Deal with retry send metastorage raft commands after a timeout
- Resolved
- links to