Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
These changes clear the object store at the end of each round during multi-round compaction. This replaces the existing behavior, which calls
delete_many()
on the list of object refs created during that round.Rationale
In E2E testing,
delete_many
showed to take far too long when deleting a large number of object refs. This made compaction latency infeasible, and soclear()
is being used instead. For this to work, only one partition may be running compaction at a time, otherwise clearing the shared object store will lead to issues.Changes
delete_many
toclear
Impact
Executing
clear()
rather thandelete_many()
should lead to better performance. However, any jobs that run multi-round compaction with multiple partitions compacting in parallel will fail.Testing
Unit tests were written.
Regression Risk
There is a risk the
clear()
, likedelete_many()
, will also take an extremely long time to run. To mitigate this, we will have to perform additional E2E testing on a large table.The multi-round tests also had to be made more lax, as the
FileObjectStore
class cannot supportclear()
. Thus, we cannot check if the files were actually deleted, although we still check ifclear()
was called.Checklist
Unit tests covering the changes have been added
E2E testing has been performed