Skip to content

Commit

Permalink
some more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
vazois committed Feb 7, 2025
1 parent 28d22dc commit 81508ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ internal sealed unsafe class SnapshotIteratorManager
readonly ReplicaSyncSession[] sessions;
readonly int numSessions;

bool firstRead = false;

public long CheckpointCoveredAddress { get; private set; }

public SnapshotIteratorManager(ReplicationSyncManager replicationSyncManager, CancellationToken cancellationToken, ILogger logger = null)
Expand Down Expand Up @@ -79,6 +81,11 @@ void WaitForFlushAll()

public bool Reader(ref SpanByte key, ref SpanByte value, RecordMetadata recordMetadata, long numberOfRecords)
{
if (!firstRead)
{
logger?.LogTrace("First Read {key} {value}", key.ToString(), value.ToString());
firstRead = true;
}
var needToFlush = false;
while (true)
{
Expand Down Expand Up @@ -162,6 +169,8 @@ public void OnStop(bool completed, long numberOfRecords, bool isMainStore, long

logger?.LogTrace("{OnStop} {store} {numberOfRecords} {targetVersion}",
nameof(OnStop), isMainStore ? "MAIN STORE" : "OBJECT STORE", numberOfRecords, targetVersion);

firstRead = false;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class ClusterReplicationDisklessSyncTests
int testTimeout = (int)TimeSpan.FromSeconds(120).TotalSeconds;

public Dictionary<string, LogLevel> monitorTests = new(){
{ "ClusterDisklessSyncFailover", LogLevel.Error }
{ "ClusterDisklessSyncFailover", LogLevel.Trace }
};

[SetUp]
Expand Down

0 comments on commit 81508ae

Please sign in to comment.