mrproliu commented on code in PR #1127:
URL: 
https://github.com/apache/skywalking-banyandb/pull/1127#discussion_r3231375763


##########
banyand/property/gossip/server.go:
##########
@@ -328,23 +336,31 @@ func (q *protocolHandler) addToProcess(request 
*propertyv1.PropagationRequest, t
        // if the latest round is out of ttl, then needs to change to current 
node to executing
        if time.Since(groupShard.latestTime) > q.s.scheduleInterval/2 {
                groupShard.originalNodeID = request.Context.OriginNode
-               select {
-               case groupShard.channel <- handlingRequestData:
-                       q.notifyNewRequest()
-               default:
-                       q.s.log.Error().Msgf("ready to added propagation into 
group shard %s(%d) in a new round, but it's full", request.Group, 
request.ShardId)
+               if groupShard.pending != nil {
+                       q.s.serverMetrics.totalCoalesced.Inc(1, request.Group)
+                       q.s.log.Info().
+                               Str("group", request.Group).
+                               Uint32("shardID", request.ShardId).
+                               Str("originNode", request.Context.OriginNode).
+                               Msg("propagation request coalesced into pending 
(TTL takeover)")
                }
+               groupShard.pending = handlingRequestData
+               q.notifyNewRequest()
                return true

Review Comment:
   Reviewed and intentionally not refreshing latestTime: if the take-over node 
also stalls, refreshing would force the next originator to wait another 
scheduleInterval/2 (~1h) before it can re-take



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to