Aborting UpdateAsync on a key which does not exist still saves an entry with GetRangeAsync

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.

2 Likes

Getting in touch with the engineers, hang tight!

Hi, do you still reproduce this issue? We are unable to reproduce it on our end.

Hi,
The problem looks solved since then. My repro now outputs the expected result.

Awesome, thank you for confirming.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.