@@ -211,7 +211,8 @@ public int updateAndCheckTablets(Manager manager, FateId fateId)
211
211
// this tablet has no files try to mark it as done
212
212
tabletsMutator .mutateTablet (tablet .getExtent ()).requireAbsentOperation ()
213
213
.requireSame (tablet , FILES , COMPACTED ).putCompacted (fateId )
214
- .submit (tabletMetadata -> tabletMetadata .getCompacted ().contains (fateId ));
214
+ .submit (tabletMetadata -> tabletMetadata .getCompacted ().contains (fateId ),
215
+ () -> "no files, attempting to mark as compacted" );
215
216
noFiles ++;
216
217
} else if (tablet .getSelectedFiles () == null && tablet .getExternalCompactions ().isEmpty ()) {
217
218
// there are no selected files
@@ -242,7 +243,8 @@ public int updateAndCheckTablets(Manager manager, FateId fateId)
242
243
// no files were selected so mark the tablet as compacted
243
244
tabletsMutator .mutateTablet (tablet .getExtent ()).requireAbsentOperation ()
244
245
.requireSame (tablet , FILES , SELECTED , ECOMP , COMPACTED ).putCompacted (fateId )
245
- .submit (tabletMetadata -> tabletMetadata .getCompacted ().contains (fateId ));
246
+ .submit (tabletMetadata -> tabletMetadata .getCompacted ().contains (fateId ),
247
+ () -> "no files, attempting to mark as compacted" );
246
248
247
249
noneSelected ++;
248
250
} else {
@@ -260,9 +262,11 @@ public int updateAndCheckTablets(Manager manager, FateId fateId)
260
262
261
263
selectionsSubmitted .put (tablet .getExtent (), filesToCompact );
262
264
263
- mutator .submit (tabletMetadata -> tabletMetadata .getSelectedFiles () != null
264
- && tabletMetadata .getSelectedFiles ().getFateId ().equals (fateId )
265
- || tabletMetadata .getCompacted ().contains (fateId ));
265
+ mutator .submit (
266
+ tabletMetadata -> tabletMetadata .getSelectedFiles () != null
267
+ && tabletMetadata .getSelectedFiles ().getFateId ().equals (fateId )
268
+ || tabletMetadata .getCompacted ().contains (fateId ),
269
+ () -> "selecting files for compaction" );
266
270
267
271
if (minSelected == null || tablet .getExtent ().compareTo (minSelected ) < 0 ) {
268
272
minSelected = tablet .getExtent ();
@@ -298,7 +302,8 @@ public int updateAndCheckTablets(Manager manager, FateId fateId)
298
302
var mutator = tabletsMutator .mutateTablet (tablet .getExtent ()).requireAbsentOperation ()
299
303
.requireSame (tablet , ECOMP , USER_COMPACTION_REQUESTED )
300
304
.putUserCompactionRequested (fateId );
301
- mutator .submit (tm -> tm .getUserCompactionsRequested ().contains (fateId ));
305
+ mutator .submit (tm -> tm .getUserCompactionsRequested ().contains (fateId ),
306
+ () -> "marking as needing a user requested compaction" );
302
307
userCompactionRequested ++;
303
308
} else {
304
309
// Marker was already added and we are waiting
@@ -400,7 +405,7 @@ private void cleanupTabletMetadata(FateId fateId, Manager manager) throws Except
400
405
mutator .deleteUserCompactionRequested (fateId );
401
406
}
402
407
403
- mutator .submit (needsNoUpdate ::test );
408
+ mutator .submit (needsNoUpdate ::test , () -> "cleanup metadata for failed compaction" );
404
409
}
405
410
}
406
411
}
0 commit comments