-
Notifications
You must be signed in to change notification settings - Fork 103
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
repoID bitmap for speeding up findShard in compound shards #899
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,7 +96,8 @@ type indexTOC struct { | |
contentChecksums simpleSection | ||
runeDocSections simpleSection | ||
|
||
repos simpleSection | ||
repos simpleSection | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we bump the index |
||
reposIDsBitmap simpleSection | ||
|
||
ranks simpleSection | ||
} | ||
|
@@ -187,6 +188,8 @@ func (t *indexTOC) sectionsTaggedList() []taggedSection { | |
{"nameBloom", &unusedSimple}, | ||
{"contentBloom", &unusedSimple}, | ||
{"ranks", &unusedSimple}, | ||
|
||
{"reposIDsBitmap", &t.reposIDsBitmap}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tiny comment, it'd be nice to group this with the in-use sections above so it's next to "repos" |
||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking out loud: what if this were not two separate steps (so callers must remember to check
MaybeContainRepo
first), but a single new method likezoekt.ReadMetadataForRepo(fn, repoID)
? That might also let us share work between the two, and avoid opening and mmapping the index file twice (although it's likely not a big deal :))