Skip to content

Commit

Permalink
logs when tablet decides there is nothing to do for user compaction
Browse files Browse the repository at this point in the history
Log when the manager reaches out to tablet server and ask it to compact
a tablet and it decides there is nothing.  The logging includes the data
used to make the decision.
  • Loading branch information
keith-turner committed Apr 18, 2024
1 parent 7c6572c commit e860ed0
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,7 @@ private void initiateSelection(CompactionKind kind, Long compactionId,

synchronized (this) {
if (closed) {
log.trace("Selection of files was not initiated {} because closed", getExtent());
return;
}

Expand All @@ -1035,6 +1036,14 @@ private void initiateSelection(CompactionKind kind, Long compactionId,
log.trace("Selected compaction status changed {} {} {} {}", getExtent(),
fileMgr.getSelectionStatus(), compactionId, compactionConfig);
} else {
if (kind == CompactionKind.USER) {
// Only log for user compaction because this code is only called when one is initiated via
// the API call. For other compaction kinds the tserver will keep periodically attempting
// to initiate which would result in lots of logs.
log.trace(
"Selection of files was not initiated {} compactionId:{} selectStatus:{} selectedFiles:{}",
getExtent(), this.compactionId, fileMgr.selectStatus, fileMgr.selectedFiles.size());
}
return;
}
}
Expand Down

0 comments on commit e860ed0

Please sign in to comment.