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

Fix cluster piece getter #3345

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ pub(super) async fn controller(
);

let fut = farmer_cache_worker
.run(piece_getter.downgrade())
.run(piece_getter)
.instrument(info_span!("", %cache_group));

async move {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,9 @@ where

let farmer_cache_worker_fut = run_future_in_dedicated_thread(
{
// Piece cache worker uses piece getter, while piece getter uses piece cache, which
// piece cache worker depends on. Use weak reference to break the cycle and allow worker
// to exit when last piece cache instance is dropped.
let future = farmer_cache_worker.run(piece_getter.downgrade());

move || future
Expand Down
Loading