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

Shards garbage collection #11883

Open
staffik opened this issue Aug 5, 2024 · 0 comments
Open

Shards garbage collection #11883

staffik opened this issue Aug 5, 2024 · 0 comments
Assignees
Labels
A-stateless-validation Area: stateless validation C-bug Category: This is a bug

Comments

@staffik
Copy link
Contributor

staffik commented Aug 5, 2024

It is likely that we currently do not garbage collect data of shards that are no longer tracked. See https://near.zulipchat.com/#narrow/stream/295302-general/topic/state.20sync.20cleanup/near/455648325 for more context.

Let's verify that by creating an integration test, that should be included anyway.
Then implement the clean up if the test fails.

@staffik staffik added C-bug Category: This is a bug A-stateless-validation Area: stateless validation labels Aug 5, 2024
@staffik staffik self-assigned this Aug 5, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 6, 2024
A step towards: #11883.

Summary:
- At `reset_heads_post_state_sync()`, we should set the tail to
`sync_height - 2` because with congestion control we depend also on prev
sync block and prev prev sync block. Also, if chunks are missing, we
should set the tail to `min_height_included - 1`.
- `maybe_receive_state_sync_blocks()` saved past blocks without
increasing refcounts. Although sync block will have its refcount
increased later, extra blocks did not, we need to increase it manually
for extra blocks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-stateless-validation Area: stateless validation C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

1 participant