bigcyy commented on PR #3860:
URL: https://github.com/apache/hertzbeat/pull/3860#issuecomment-3550393141

   Thank you very much for the PR and review invitation! I looked over the 
code, and it seems to differ slightly from my understanding. I have the 
following questions:
   
   1.  I support changing `rpop` to `brpop` because it prevents CPU spin, but 
when `brpop` returns `null` after hitting a timeout due to its blocking nature, 
does the external fallback algorithm need to continue blocking for an even 
longer time? Can we just directly enter the next round of `brpop` or set a 
longer blocking time for `brpop`?
   2.  My understanding is that the fallback strategy is intended for when 
`brpop` encounters an exception (e.g., a network connection failure). In such 
cases, we can attempt to reconnect. If the reconnection fails, we block and 
attempt to reconnect again, and only after reaching the retry limit do we 
terminate the consumer thread.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to