Skip to content

Conversation

@Kbhat1
Copy link
Contributor

@Kbhat1 Kbhat1 commented Jan 5, 2024

Describe your changes and provide context

  • Fix for PebbleDB Iterator issue
  • Previously, the mvcc iterator would loop indefinitely when it reached a key that was greater than the iterator version specified and go back to a previous key
  • Catch the scenario where iterator moves back to previous key and move it forward to avoid a loop

Testing performed to validate your change

  • Tested and repro'd error on node

Before fix:
image

After fix:
image

@Kbhat1 Kbhat1 requested a review from yzang2019 January 8, 2024 17:14
}

// Tests bug where iterator loops continuously
func (s *StorageTestSuite) TestDatabaseIteratorLooping() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should add a test for reverse iteration as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea there are a lot more unit tests that are going to be pushed

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.

3 participants