Skip to content

Commit

Permalink
fix(reserve): evict just enough chunks to reach the capacity (#4549)
Browse files Browse the repository at this point in the history
  • Loading branch information
istae committed Apr 15, 2024
1 parent 06f92b8 commit ff08a65
Show file tree
Hide file tree
Showing 9 changed files with 962 additions and 146 deletions.
6 changes: 3 additions & 3 deletions pkg/storer/compact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ func TestCompact(t *testing.T) {
}
}

c, unsub := st.Events().Subscribe("batchExpiryDone")
t.Cleanup(unsub)

err = st.EvictBatch(ctx, evictBatch.ID)
if err != nil {
t.Fatal(err)
}

c, unsub := st.Events().Subscribe("batchExpiryDone")
t.Cleanup(unsub)
<-c

time.Sleep(time.Second)
Expand Down
Loading

0 comments on commit ff08a65

Please sign in to comment.