Skip to content

fix: reset reserve only when neighborhood hopping#4807

Merged
istae merged 5 commits intomasterfrom
reset-reserve
Sep 11, 2024
Merged

fix: reset reserve only when neighborhood hopping#4807
istae merged 5 commits intomasterfrom
reset-reserve

Conversation

@istae
Copy link
Contributor

@istae istae commented Sep 9, 2024

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

also renamed "namespace" in chunkstamp and stampindex to "scope"
also cleaned up some unnecessary index store funcs

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

Copy link
Member

@nugaon nugaon left a comment

Choose a reason for hiding this comment

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

I thought it keeps the pinned chunks alive somehow, or will that be implemented in a different PR?

Comment on lines +521 to +524
size := r.Size()

bRitems := make([]*BatchRadiusItem, 0, size)
Copy link
Member

Choose a reason for hiding this comment

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

I don't completely get why the capacity equals to the reserve size, it may be better to use any higher value than this since a half of the reserve contains 2 million items.

Copy link
Contributor Author

@istae istae Sep 10, 2024

Choose a reason for hiding this comment

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

The size here is the actual number of chunks in the reserve. So the capacity of the slice is exactly the same as the number of entries..

Copy link
Member

Choose a reason for hiding this comment

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

nice!
is append better than just make with the length of r.Size() and assign by indices?

@istae istae merged commit ab76c0b into master Sep 11, 2024
@istae istae deleted the reset-reserve branch September 11, 2024 12:00
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.

4 participants