Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,11 @@ private void generateSnapshotCheckpoint(HttpServletRequest request,
.filter(s -> s.endsWith(ROCKSDB_SST_SUFFIX))
.distinct()
.collect(Collectors.toList()));
LOG.info("Received excluding SST {}", receivedSstList);
LOG.info("Received excluding SST {}. The total excluded sst files count is {}",
receivedSstList.subList(0, Math.min(5, receivedSstList.size())), receivedSstList.size());
if (LOG.isDebugEnabled()) {
LOG.debug("Received excluding SST {}", receivedSstList);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits:

  1. Put quick info at the start, details later. In this specific case: show count first, items afterwards. Something like: "Received list of {} SST files to be excluded, sample: {}", count, sublist)
  2. Avoid duplication. Please extract and reuse logic for getting the sublist.
  3. I think logging one message, debug or info, is enough. Message can be almost the same, just omit , sample. Construct the message by extracting the common parts.

}

Path tmpdir = null;
Expand Down Expand Up @@ -229,9 +233,11 @@ private void generateSnapshotCheckpoint(HttpServletRequest request,
long duration = Duration.between(start, end).toMillis();
LOG.info("Time taken to write the checkpoint to response output " +
"stream: {} milliseconds", duration);

LOG.info("Excluded SST {} from the latest checkpoint.",
excludedSstList);
LOG.info("Excluded SST {} from the latest checkpoint. The total excluded sst files count is {}",
excludedSstList.subList(0, Math.min(5, excludedSstList.size())), excludedSstList.size());
if (LOG.isDebugEnabled()) {
LOG.debug("Excluded SST {} from the latest checkpoint.", excludedSstList);
}
if (!excludedSstList.isEmpty()) {
dbMetrics.incNumIncrementalCheckpoint();
}
Expand Down