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

DM-29737: Perform a brute-force search if binary search fails #580

Merged
merged 1 commit into from Apr 15, 2021

Conversation

arunkannawadi
Copy link
Member

@arunkannawadi arunkannawadi commented Apr 14, 2021

Instead of assuming that the catalog is always sorted, the updated find method first performs a binary search hoping that the catalog is sorted, and if unsuccessful, performs a brute-force linear search before declaring it unsuccessful. This fixes the bug of not finding record IDs for unsorted catalog, but fails slower for sorted catalogs.

Copy link
Member

@TallJimbo TallJimbo left a comment

Choose a reason for hiding this comment

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

Looks good!

(Saw the PR and decided to approve without being asked before I run off to do chores; feel free to consider it reviewed on Jira, too, if you don't need further changes or they're trivial.)

@arunkannawadi arunkannawadi merged commit 795c156 into master Apr 15, 2021
@arunkannawadi arunkannawadi deleted the tickets/DM-29737 branch April 15, 2021 03:44
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.

None yet

2 participants