Skip to content

Conversation

@keith-turner
Copy link
Contributor

@keith-turner keith-turner commented Sep 1, 2021

I noticed when looking into #2239 that when a compaction job starts and reserves files that there is no check to ensure the tablet still has those files. I think this race condition is unlikely to occur, but not impossible. This PR add a check for this. This check prevents unnecessary work from occurring. The code is correct without the check in that it would currently fail after the compaction runs if this situation were to occur.

@keith-turner keith-turner merged commit 0bf3c9e into apache:main Sep 2, 2021
@keith-turner keith-turner deleted the comprec branch September 2, 2021 13:01
@EdColeman
Copy link
Contributor

Asking for clarification - what happens if the check fails? Is it rescheduled or is that left up to the caller that scheduled the compaction?

wx930910 pushed a commit to wx930910/accumulo that referenced this pull request Sep 4, 2021
@keith-turner
Copy link
Contributor Author

Asking for clarification - what happens if the check fails? Is it rescheduled or is that left up to the caller that scheduled the compaction?

@EdColeman tablets are periodically examined and a compaction planner is asked to create zero or more compaction jobs (an immutable object the describes compaction work to do). These jobs are queued to run later. When the job actually goes to run, maybe things have changed (like this PR is checking for) in which case the job is ignored. Later when the tablet is examined again, new jobs will be created that incorporate the changes.

@ctubbsii ctubbsii added this to the 2.1.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

None yet

Development

Successfully merging this pull request may close these issues.

4 participants