You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2023/09/06 16:57:45 UTC

[GitHub] [accumulo] keith-turner commented on issue #3740: Concurrent major compactions could possibly cause metadata inconsistencies

keith-turner commented on issue #3740:
URL: https://github.com/apache/accumulo/issues/3740#issuecomment-1708768308

   Tried to produce this problem in a test that should have caused it and was unable to reproduce it.   Did a lot of digging and found [this code](https://github.com/apache/accumulo/blob/b1b2557f949e9212a1b1ca9b65f2d66c01a69edb/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java#L386-L392) was preventing the race condition from occurring.  That code is called when planning a compaction to get the files that are candidates for compaction. When the set of files currently compacting is not a subset of the tablets current files, then an empty set of candidates is returned.  So a new compaction will never start running between the in memory update and metadata update because of this check.  The set of all files compacting is not updated until after the metadata update, so it just happens to cover what is needed to prevent the race condition.
   
   The code should still be fixed because the code that prevents the problem is so far from the code where the problem is.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org