lucaspeng12138 opened a new pull request, #6161:
URL: https://github.com/apache/inlong/pull/6161

   ### Prepare a Pull Request
   
   Fix heartbeat status update
   - Fixes #6159 
   
   ### Motivation
   
   When heartbeat received, heartbeat manager init thread and update thread may 
get same version in inlong_cluster_node table. Then two threads will use same 
version to update this table. One of them will failed. As update operation in 
reportHeartbeat function will be skipped if last heartbeat with same type 
exists cache. So heartbeat status may be timeout still cache dropped.
   
   ### Modifications
   
   Add return judgment. 
   When MySql return is larger than zero, it means at least one field is 
updated. So when return is zero, skip add this heartbeat into cache. To avoid 
next heartbeat received, because last heartbeat cached, cause skipping update 
MySql.
   
   ### Verifying this change
   
   Add return judgment. 
   When MySql return is larger than zero, it means at least one field is 
updated. So when return is zero, skip add this heartbeat into cache. To avoid 
next heartbeat received, because last heartbeat cached, cause skipping update 
MySql.


-- 
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: commits-unsubscr...@inlong.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to