Skip to content

Commit caf79df

Browse files
committed
enable LogPrimaryStream for ClusterSRNoCheckpointRestartSecondary
1 parent f4101c7 commit caf79df

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

libs/cluster/Session/RespClusterReplicationCommands.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,13 @@ private bool NetworkClusterAppendLog(out bool invalidParameters)
235235
[Conditional("DEBUG")]
236236
static void LogPrimaryStream(int physicalSublogIdx, long previousAddress, long currentAddress, long nextAddress, ILogger logger)
237237
{
238-
// Log as critical to ensure it is visible in CI
239-
logger?.LogCritical("physicalSublogIdx: {physicalSublogIdx}, previousAddress: {previousAddres}, currentAddress: {currentAddress}, nextAddress: {nextAddress}", physicalSublogIdx, previousAddress, currentAddress, nextAddress);
238+
var state = new GarnetTestLoggingEvent()
239+
{
240+
type = GarnetTestLoggingEventType.LogPrimaryStreamType,
241+
msg = $"physicalSublogIdx: {physicalSublogIdx}, previousAddress: {previousAddress}, currentAddress: {currentAddress}, nextAddress: {nextAddress}",
242+
};
243+
244+
logger?.LogTesting(LogLevel.Critical, state);
240245
}
241246
}
242247

test/Garnet.test.cluster/ReplicationTests/ClusterReplicationBaseTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ public void ClusterSRTest([Values] bool disableObjects)
156156
[Category("REPLICATION")]
157157
public void ClusterSRNoCheckpointRestartSecondary([Values] bool performRMW, [Values] bool disableObjects)
158158
{
159+
context.EnableGarnetLoggingEvents([GarnetTestLoggingEventType.LogPrimaryStreamType]);
160+
159161
var replica_count = 1;// Per primary
160162
var primary_count = 1;
161163
var primaryIndex = 0;

0 commit comments

Comments
 (0)