Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Copy over #2444
Browse files Browse the repository at this point in the history
  • Loading branch information
fsamuel-bs committed Oct 11, 2017
1 parent 7288b63 commit 4c72cd7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,13 @@ private long grabLocksAndRun(SweepLocks locks) throws InterruptedException {
log.info("The table being swept by the background sweeper was dropped, moving on...");
} else {
SweepBatchConfig lastBatchConfig = getAdjustedBatchConfig();
log.warn("The background sweep job failed unexpectedly with batch config {}."
log.warn("The background sweep job failed unexpectedly with candidate batch size {},"
+ " delete batch size {},"
+ " and {} cell+timestamp pairs to examine."
+ " Attempting to continue with a lower batch size...",
SafeArg.of("cell batch size", lastBatchConfig),
SafeArg.of("candidateBatchSize", lastBatchConfig.candidateBatchSize()),
SafeArg.of("deleteBatchSize", lastBatchConfig.deleteBatchSize()),
SafeArg.of("maxCellTsPairsToExamine", lastBatchConfig.maxCellTsPairsToExamine()),
e);
// Cut batch size in half, always sweep at least one row (we round down).
batchSizeMultiplier = Math.max(batchSizeMultiplier / 2, 1.5 / lastBatchConfig.candidateBatchSize());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,14 @@ void runOnceForTable(TableToSweep tableToSweep,
// This error may be logged on some paths above, but I prefer to log defensively.
log.info("Failed to sweep table {}"
+ " at row {}"
+ " with batch config {}.",
+ " with candidate batch size {},"
+ " delete batch size {},"
+ " and {} cell+timestamp pairs to examine.",
LoggingArgs.tableRef("tableRef", tableRef),
UnsafeArg.of("startRow", startRowToHex(startRow)),
SafeArg.of("batchConfig", batchConfig),
SafeArg.of("candidateBatchSize", batchConfig.candidateBatchSize()),
SafeArg.of("deleteBatchSize", batchConfig.deleteBatchSize()),
SafeArg.of("maxCellTsPairsToExamine", batchConfig.maxCellTsPairsToExamine()),
e);
throw e;
}
Expand Down
5 changes: 5 additions & 0 deletions docs/source/release_notes/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ develop
We now throw the actual cause for the invocation exception.
(`Pull Request <https://github.com/palantir/atlasdb/pull/2460>`__)

* - |fixed|
- Sweep candidate batches are now logged correctly.
Previously, we would log a ``SafeArg`` for these batches that had no content.
(`Pull Request <https://github.com/palantir/atlasdb/pull/2475>`__)

.. <<<<------------------------------------------------------------------------------------------------------------->>>>
=======
Expand Down

0 comments on commit 4c72cd7

Please sign in to comment.