Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-48404

Unclear contract of ReadThroughCache around transitions between "Key Found" and "Key NOT Found"

    • Fully Compatible
    • ALL
    • Sharding 2020-06-01

      The ReadThroughCache has a strict and clear contract around calls to invalidate, but the behaviour of advanceTimeInStore is under-specified with respect to keys getting deleted or appearing in the underlying store.

      The behaviour should be:

      • If Key is in the cache and then disappears from the underlying store, all acquire calls that follow the call to advanceTimeInStore which reflects the deletion, must keep refreshing from the store and returning an empty ValueHandle. Any already returned ValueHandle(s) will have isValid() == false per the contract of advanceTimeInStore.
      • If Key is not in the cache and then gets inserted in the underlying store, all acquire calls that follow the call to advanceTimeInStore which reflects the insertion, must return a valid ValueHandle.

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: