You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the code below I create collection with one element using SSet(), and than I delete this element. When I call SGet()' on such element, the status is NotFound, and everything seems to be OK. However If I try to seek such element through iterator (both Seek()andSeekToFirst()`), I may get it with empty string as a value - so when I use iterator I cannot distinct deleted element from element with empty string as value.
localhost/kvdk:build# PMEM_IS_PMEM_FORCE=1 ./dbtest --gtest_filter="*SeekToFirst*"
Note: Google Test filter = *SeekToFirst*
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from EngineBasicTest
[ RUN ] EngineBasicTest.TestSeekToFirst
[LOG] time 0 ms: Initializing PMEM size 17179869184 in file /mnt/pmem0/data/data
[LOG] time 1977 ms: Map pmem space done
[LOG] time 1979 ms: In restoring: iterated 0 records
foo
[ OK ] EngineBasicTest.TestSeekToFirst (2034 ms)
[----------] 1 test from EngineBasicTest (2034 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (2034 ms total)
[ PASSED ] 1 test.
I may workaround this problem by calling additional SGet() after each SeekToFirst(), but it would be much more intuitive, less error prone and probably faster if such iterator would be invalid after removal of all elements in collection.
The text was updated successfully, but these errors were encountered:
In the code below I create collection with one element using
SSet()
, and than I delete this element. When I callSGet()' on such element, the status is
NotFound, and everything seems to be OK. However If I try to seek such element through iterator (both
Seek()and
SeekToFirst()`), I may get it with empty string as a value - so when I use iterator I cannot distinct deleted element from element with empty string as value.Test output:
I may workaround this problem by calling additional
SGet()
after eachSeekToFirst()
, but it would be much more intuitive, less error prone and probably faster if such iterator would be invalid after removal of all elements in collection.The text was updated successfully, but these errors were encountered: