Copilot commented on code in PR #59356:
URL: https://github.com/apache/doris/pull/59356#discussion_r2646661160


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Tablet.java:
##########
@@ -123,7 +123,7 @@ public TabletHealth() {
     private long cooldownReplicaId = -1;
     @SerializedName(value = "ctm", alternate = {"cooldownTerm"})
     private long cooldownTerm = -1;
-    private MonitoredReentrantReadWriteLock cooldownConfLock = new 
MonitoredReentrantReadWriteLock();
+    private Object cooldownConfLock = new Object();

Review Comment:
   The cooldownConfLock should be marked as final to prevent accidental 
reassignment, which would break the synchronization guarantees. Since this 
object is used for synchronization in setCooldownConf() and getCooldownConf(), 
it's critical that all threads synchronize on the same object instance 
throughout the lifetime of the Tablet object.
   ```suggestion
       private final Object cooldownConfLock = new Object();
   ```



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