In the UpdateAsync method of a MemoryStoreSortedMap object, returning nil in the transform function with a key that does not exist yet (to abord the operation) will still save an empty entry, which can be gotten using the GetRangeAsync method. The entry will have the “key” field registered, but no “value” field.
Reproduction steps:
- Call UpdateAsync on a MemoryStoreSortedMap with a key which does not exist yet and return nil in the transform function.
- Call GetRangeAsync on the same MemoryStoreSortedMap.
Example below:
Workaround:
Check that the “value” field exists.
Expected behavior
The result of GetRangeAsync should not include the key, as the operation was aborted.