You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This patch changes the peer snapshot retrieval
logic from a non-blocking channel write to a
blocking channel write with a timeout. This allows
gRPC's own buffering mechanisms to apply back pressure
when sending large state snapshots.
Additionally, this change will suppress some of the
spammy log messages which can flood logs when the
correlation id gets out of sync.
https://jira.hyperledger.org/browse/FAB-380
Change-Id: Icc3d37f2d161f6ac0bae984ca43e2286a45fbb3d
Signed-off-by: Jason Yellick <[email protected]>
// Was not able to write to the channel, in which case the Snapshot stream is incomplete, and must be discarded, closing the channel
506
517
// without sending the terminating message which would have had an empty byte slice.
507
-
peerLogger.Warningf("Did NOT send SyncStateSnapshot message to channel for correlationId = %d, sequence = %d, closing channel as the message has been discarded", syncStateSnapshot.Request.CorrelationId, syncStateSnapshot.Sequence)
518
+
peerLogger.Warningf("Did NOT send SyncStateSnapshot message to channel for correlationId = %d, sequence = %d because we timed out reading, closing channel as the message has been discarded", syncStateSnapshot.Request.CorrelationId, syncStateSnapshot.Sequence)
508
519
d.snapshotRequestHandler.reset()
509
520
}
510
521
} else {
511
-
//Ignore the message, does not match the current correlationId
512
-
peerLogger.Warningf("Ignoring SyncStateSnapshot message with correlationId = %d, sequence = %d, as current correlationId = %d", syncStateSnapshot.Request.CorrelationId, syncStateSnapshot.Sequence, d.snapshotRequestHandler.correlationID)
peerLogger.Warningf("Ignoring SyncStateSnapshot message with correlationId = %d, sequence = %d, as current correlationId = %d, future messages for this (and older ids) will be suppressed", syncStateSnapshot.Request.CorrelationId, syncStateSnapshot.Sequence, d.snapshotRequestHandler.correlationID)
0 commit comments