Update elasticity MergeTablets to use MERGED marker#3975
Conversation
The MERGED marker is set on the last tablet of the merged range after metadata has been updated so that it is possible to know whether or not the files were already fenced. If the marker exists then the fencing for the last tablet can be skipped as the process was restarted.
|
@keith-turner - I put the code to clean up the |
| assertEquals(159L, tm3.getSelectedFiles().getFateTxId()); | ||
| assertFalse(tm3.getSelectedFiles().initiallySelectedAll()); | ||
| assertEquals(selFiles.getMetadataValue(), tm3.getSelectedFiles().getMetadataValue()); | ||
| assertTrue(tm3.hasMerged()); |
There was a problem hiding this comment.
Would be good to add another check somewhere else for the case when merged is not set to enure its false.
There was a problem hiding this comment.
I will add an assertion for that above to one of the other TabletMetadata objects that doesn't set it
The MERGED marker is set on the last tablet of the merged range after metadata has been updated so that it is possible to know whether or not the files were already fenced. If the marker exists then the fencing for the last tablet can be skipped as the process was restarted.
This is a follow on to #3957 and applies that changes that were done in main in
TabletGroupWatcherto theMergeTabletsandDeleteTabletsfate ops.The existing tests in MergeIT verify that the merged marker is properly cleared.