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

Remove unnecessary counters from persistent state #2639

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

frederikrothenberger
Copy link
Contributor

@frederikrothenberger frederikrothenberger commented Oct 2, 2024

The StableBTreeMap tracks the number of elements on its own, so there is no need for an external counter.

Removing the extra counters also makes the stats resetting obsolete and hence allows to remove the pre_stats II version from the integration tests.

The `StableBTreeMap` tracks the number of elements on its own, so there
is no need for an external counter.

Removing the extra counters also makes the stats resetting obsolete
and hence allows to remove the pre_stats II version from the
integration tests.
Copy link
Collaborator

@lmuntaner lmuntaner left a comment

Choose a reason for hiding this comment

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

How about the future stable memory. Is removing keys frontwards compatible? Could we rollback afterwards to the memory with the counting fields?

@frederikrothenberger
Copy link
Contributor Author

How about the future stable memory. Is removing keys frontwards compatible? Could we rollback afterwards to the memory with the counting fields?

Yes, because the fields are optional. Note that we do have explicit upgrade / rollback tests to verify that.

Copy link
Collaborator

@lmuntaner lmuntaner left a comment

Choose a reason for hiding this comment

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

Thanks!

@lmuntaner
Copy link
Collaborator

Yes, because the fields are optional. Note that we do have explicit upgrade / rollback tests to verify that.

True, I forgot about them.

@frederikrothenberger frederikrothenberger added this pull request to the merge queue Oct 2, 2024
Merged via the queue into main with commit 34c1321 Oct 2, 2024
66 checks passed
@frederikrothenberger frederikrothenberger deleted the frederik/remove-unnecessary-counter branch October 2, 2024 15:03
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.

2 participants