rosedblabs / rosedb

Lightweight, fast and reliable key/value storage engine based on Bitcask.
https://rosedblabs.github.io
Apache License 2.0
4.58k stars 632 forks source link

Expired Keys Found in AscendKeys/DescendKeys #285

Closed taroim closed 1 year ago

taroim commented 1 year ago

When iterating through data using AscendKeys/DescendKeys, is it observed that expired keys are still being output?

roseduan commented 1 year ago

I rechecked the logic, it does as you said.

If we check the expiration time while iterating, it will have disk seeking, which will slow down the performance.

I can add this if you want. But the iterate performance will be a little slower.

taroim commented 1 year ago

You could consider adding an option to determine whether to filter out expired KEYs

roseduan commented 1 year ago

You could consider adding an option to determine whether to filter out expired KEYs

OK Thanks

roseduan commented 1 year ago

Added in the latest release, enjoy!