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

dedup find missed accessors logic #13344

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

dedup find missed accessors logic #13344

wants to merge 3 commits into from

Conversation

sudeepdino008
Copy link
Member

@sudeepdino008 sudeepdino008 commented Jan 8, 2025

Base automatically changed from aggr2 to main January 8, 2025 10:10
}
return fileItemsWithMissingAccessors(d.dirtyFiles, d.aggregationStep, func(fromStep uint64, toStep uint64) []string {
return []string{
d.kvBtFilePath(fromStep, toStep),
Copy link
Collaborator

Choose a reason for hiding this comment

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

here need add: if d.indexList.Has(withMapIndex), if d.indexList.Has(withBtInex), if d.indexList.Has(withExistanceIndex)`.

now commitment domain has only .kvi accessor - no .bt/.kvei

Copy link
Member Author

@sudeepdino008 sudeepdino008 Jan 8, 2025

Choose a reason for hiding this comment

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

even without the checks it works because the caller "continued" the loop if indexList didn't support. But look at edit now...I think it's better.

Copy link
Member

Choose a reason for hiding this comment

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

@sudeepdino008 still need to check structure index list required. So with this update we always expect kv has to have bt index, existence index and we also support MPH indexes.. Therefore we will create them even if they are not needed, since check if index required removed below.

Copy link
Member

Choose a reason for hiding this comment

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

optional indexing is a feature for domains and history, since index list is provided in structure -should reckon with it

}
return fileItemsWithMissingAccessors(d.dirtyFiles, d.aggregationStep, func(fromStep uint64, toStep uint64) []string {
return []string{
d.kvBtFilePath(fromStep, toStep),
Copy link
Member

Choose a reason for hiding this comment

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

@sudeepdino008 still need to check structure index list required. So with this update we always expect kv has to have bt index, existence index and we also support MPH indexes.. Therefore we will create them even if they are not needed, since check if index required removed below.

}
return fileItemsWithMissingAccessors(d.dirtyFiles, d.aggregationStep, func(fromStep uint64, toStep uint64) []string {
return []string{
d.kvBtFilePath(fromStep, toStep),
Copy link
Member

Choose a reason for hiding this comment

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

optional indexing is a feature for domains and history, since index list is provided in structure -should reckon with it

}

// BuildMissedAccessors - produce .efi/.vi/.kvi from .ef/.v/.kv
func (d *Domain) BuildMissedAccessors(ctx context.Context, g *errgroup.Group, ps *background.ProgressSet) {
d.History.BuildMissedAccessors(ctx, g, ps)
for _, item := range d.missedBtreeAccessors() {
if d.IndexList&AccessorBTree == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

so yeah, that means that we do not create btree index if flag bit is 0. Index creation is optional

@sudeepdino008 sudeepdino008 requested a review from awskii January 14, 2025 09:51
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