Skip to content

Commit 781f6d3

Browse files
author
ines potier
committed
More tweaking CommitLogSegmentManager logs
1 parent 6841f29 commit 781f6d3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ public void recover(File file, boolean tolerateTruncation) throws IOException
409409
{
410410
int replayPos = replayEnd + CommitLogSegment.SYNC_MARKER_SIZE;
411411

412-
logger.debug("Replaying {} between {} and {}",
412+
logger.trace("Replaying {} between {} and {}",
413413
SafeArg.of("file", file.getName()),
414414
SafeArg.of("start", reader.getFilePointer()),
415415
SafeArg.of("end", end));

src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import java.util.concurrent.LinkedBlockingQueue;
3434
import java.util.concurrent.TimeUnit;
3535
import java.util.concurrent.atomic.AtomicLong;
36+
import java.util.stream.Collectors;
3637

3738
import com.palantir.logsafe.SafeArg;
3839
import com.google.common.annotations.VisibleForTesting;
@@ -450,6 +451,11 @@ void enableReserveSegmentCreation()
450451
*/
451452
private Future<?> flushDataFrom(List<CommitLogSegment> segments, boolean force, String reason)
452453
{
454+
logger.debug("Flushing data from segments {} with reason {}",
455+
SafeArg.of("segments", segments.stream().map(segment -> segment.id).collect(Collectors.toSet())),
456+
SafeArg.of("reason", reason),
457+
SafeArg.of("force", force));
458+
453459
if (segments.isEmpty())
454460
return Futures.immediateFuture(null);
455461
final ReplayPosition maxReplayPosition = segments.get(segments.size() - 1).getContext();

0 commit comments

Comments
 (0)