Skip to content
Draft
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
6 changes: 6 additions & 0 deletions bottomless/src/replicator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,12 @@ impl Replicator {
}
drop(permit);
});

// A JoinSet holds every finished task until it is joined, so
// without this the set keeps one entry per uploaded batch for
// the whole life of the replicator and memory grows with the
// WAL. Reap the finished uploads as they complete.
while join_set.try_join_next().is_some() {}
}

while join_set.join_next().await.is_some() {}
Expand Down
Loading