Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-22214

Meta storage idempotent invokes: persist and recovery idempotent command cache

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0
    • None

    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

          Activity

            People

              alapin Alexander Lapin
              alapin Alexander Lapin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 50m
                  2h 50m