Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding reverse transactions #121

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

vaibhawvipul
Copy link

  • adding reverse scan
  • for Transaction::Scan and DB::Scan
  • added test cases

@vaibhawvipul vaibhawvipul marked this pull request as ready for review September 2, 2024 14:05
Copy link
Member

@ethe ethe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because Tonbo based on LSM Tree, mutable and immutable memtable is just the in-memory part of storage, I think LevelStream also needs to be supported. number of records in test cases is too small, which means all records are stored in mutable membtale, behaviors of sstable part are missed.

@ethe
Copy link
Member

ethe commented Sep 2, 2024

Also test_reverse_scan_with_struct is not correct, I just add more assertions on it, you can check it on af4a1d5, it shows that reverse iteration returns zero numbers of element, and rest of assertions are skipped. Because swap lower bound and upper bound does not make sense to crossbeam SkipMap, it does not support this to reverse the iteration in that way, you need to change the behavior of MutableScan to realize that.

src/lib.rs Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants