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

Add referencing for safe removal of unused Bitswap blocks #16073

Merged
merged 10 commits into from
Oct 16, 2024

Conversation

svv232
Copy link
Member

@svv232 svv232 commented Sep 18, 2024

No description provided.

@svv232 svv232 changed the title Sai/bitswaplip2phelperdefinitions Extending libp2p helper lib Sep 18, 2024
@svv232 svv232 changed the title Extending libp2p helper lib modifying downloader, deletion and mainloop in bitswap libp2p Sep 18, 2024
@svv232 svv232 changed the title modifying downloader, deletion and mainloop in bitswap libp2p Add referencing via lmdb for downloader, deletion and mainloop in bitswap libp2p Sep 18, 2024
@svv232
Copy link
Member Author

svv232 commented Sep 18, 2024

!ci-build-me

2 similar comments
@svv232
Copy link
Member Author

svv232 commented Sep 18, 2024

!ci-build-me

@svv232
Copy link
Member Author

svv232 commented Sep 18, 2024

!ci-build-me

@svv232 svv232 marked this pull request as ready for review September 18, 2024 07:14
@svv232 svv232 requested a review from a team as a code owner September 18, 2024 07:14
@svv232
Copy link
Member Author

svv232 commented Sep 19, 2024

!ci-build-me

3 similar comments
@svv232
Copy link
Member Author

svv232 commented Sep 19, 2024

!ci-build-me

@svv232
Copy link
Member Author

svv232 commented Sep 19, 2024

!ci-build-me

@svv232
Copy link
Member Author

svv232 commented Sep 19, 2024

!ci-build-me

@@ -14,7 +14,7 @@ libp2p_helper: ../../libp2p_ipc/libp2p_ipc.capnp.go
test: ../../libp2p_ipc/libp2p_ipc.capnp.go
cd src/libp2p_helper \
&& (ulimit -n 65536 || true) \
&& $(GO) test -short -timeout 40m
&& $(GO) test -short -timeout 60m
Copy link
Member

Choose a reason for hiding this comment

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

wow, that is short 😁

is this timeout justified by having to run more tests?
could it have been accidentally leaked from development process?

Copy link
Member Author

Choose a reason for hiding this comment

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

The 40 minute timeout wasn't enough for these changes with some runs. I found relatively low variance with a 60 second timeout. I wasn't sure what the problem was initially on remote until i got the test passing locally after waiting longer. We run The new downloader test as well as the util test. It seams justified to me, because the downloader was not required before.

@svv232 svv232 added the bitswap label Oct 1, 2024
@georgeee georgeee force-pushed the sai/bitswaplip2phelperdefinitions branch 3 times, most recently from ff8a39d to 63f4c3c Compare October 14, 2024 13:16
@georgeee georgeee force-pushed the sai/bitswaplip2phelperdefinitions branch 6 times, most recently from 7a6392d to 7df326d Compare October 14, 2024 14:24
georgeee and others added 4 commits October 14, 2024 14:27
Motivation: block size that we';ll be using in production is too large
for effective bug searching via property tests.
Commit doesn't compile. Commit that comes next in the branch is going to
fix it. Separation is made for greater clarity during review.

Integrates commit o1-labs/go-bs-lmdb@1dc365f
which introduces a method to atomically delete blocks after checking a
predicate (`DeleteBlocksIf`).
New behavior introduced by the commit: if a bitswap
block references is used by some root not fully deleted from
the storage, it won't be deleted.
@georgeee georgeee force-pushed the sai/bitswaplip2phelperdefinitions branch from 7df326d to e979bdf Compare October 14, 2024 14:29
Update the test after reference tracking change.
Commentary from Sai:

The 40 minute timeout wasn't enough for these changes with some runs.
I found relatively low variance with a 60 minute timeout.
I wasn't sure what the problem was initially on remote until i got the
test passing locally after waiting longer.

We run the new downloader test as well as the util test.
It seems justified to me, because the downloader was not required before.
@georgeee georgeee force-pushed the sai/bitswaplip2phelperdefinitions branch from e979bdf to 637a9dc Compare October 14, 2024 14:36
@georgeee georgeee changed the title Add referencing via lmdb for downloader, deletion and mainloop in bitswap libp2p Add referencing for safe removal of unused Bitswap blocks Oct 14, 2024
Base automatically changed from sai/bitswaplibp2p to compatible October 16, 2024 15:18
@svv232
Copy link
Member Author

svv232 commented Oct 16, 2024

!ci-build-me

1 similar comment
@svv232
Copy link
Member Author

svv232 commented Oct 16, 2024

!ci-build-me

@svv232 svv232 merged commit fabc4eb into compatible Oct 16, 2024
46 checks passed
@svv232 svv232 deleted the sai/bitswaplip2phelperdefinitions branch October 16, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants