Skip to content

Makes user compaction metadata independent.#3578

Merged
keith-turner merged 5 commits into
apache:elasticityfrom
keith-turner:accumulo-3517
Jul 13, 2023
Merged

Makes user compaction metadata independent.#3578
keith-turner merged 5 commits into
apache:elasticityfrom
keith-turner:accumulo-3517

Conversation

@keith-turner
Copy link
Copy Markdown
Contributor

Before this change user initiated compactions stored config in a single place in zookeeper and had a single counter in each tablet. This system made it impossible for concurrent user initiated compactions to run on the same table with different configuration. This commit adds compaction config storage and tablet metadata that has 1:1 correspondence with the fate operation driving a user initiated compaction. This allows each user initiated compaction to be independent. This new system also avoids some odd race conditions with tablet metadata updates that existed with old per tablet compaction counter. Instead of a counter each tablet now conceptually has a set of the fate transaction ids that have completed a compaction.

See the new documention in TableOperations.compact() for an example.

fixes #3517

Before this change user initiated compactions stored config in a single
place in zookeeper and had a single counter in each tablet.  This system
made it impossible for concurrent user initiated compactions to run on
the same table with different configuration.  This commit adds
compaction config storage and tablet metadata that has 1:1
correspondence with the fate operation driving a user initiated
compaction.  This allows each user initiated compaction to be
independent.  This new system also avoid some odd race conditions with
tablet metadata updates that existed with old per tablet compaction
counter.  Instead of a counter each tablet now conceptually has a set of
the fate transaction ids that have completed a compaction.

See the new documention in TableOperations.compact() for an example.

fixes apache#3517
@keith-turner keith-turner linked an issue Jul 10, 2023 that may be closed by this pull request
@keith-turner
Copy link
Copy Markdown
Contributor Author

This commit also implements compaction cancellation and fixes a few misc compaction bugs in the elasticity branch.

@keith-turner
Copy link
Copy Markdown
Contributor Author

All tests in CompactionIT are passing with these changes.

Comment thread core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java Outdated
Comment thread core/src/main/java/org/apache/accumulo/core/metadata/schema/MetadataSchema.java Outdated
@keith-turner keith-turner merged commit ff5148a into apache:elasticity Jul 13, 2023
@keith-turner keith-turner deleted the accumulo-3517 branch July 13, 2023 00:07
@keith-turner
Copy link
Copy Markdown
Contributor Author

keith-turner commented Jul 13, 2023

Merged this because I have another PR that builds on this to remove code from the tserver and I need to get that change in so I can start making changes to improve the tablet server code. If anyone was looking at this feel free to comment still, I can address any comments in follow on commits or issues.

@ctubbsii ctubbsii added this to the 4.0.0 milestone Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Make concurrent user compactions independent

3 participants