gavinchou commented on code in PR #59539:
URL: https://github.com/apache/doris/pull/59539#discussion_r2678817045


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/TabletInvertedIndex.java:
##########
@@ -903,6 +922,41 @@ public List<Replica> getReplicasByTabletId(long tabletId) {
         }
     }
 
+
+    /**
+     * Get tablet id by replica id.
+     * This method searches through replicaMetaTable to find the tablet that 
contains the given replica.
+     * @param replicaId the replica id
+     * @return the tablet id, or NOT_EXIST_VALUE (-1) if not found or lock 
timeout
+     */
+    public long getTabletIdByReplicaId(long replicaId) {
+        // Use timeout to prevent deadlock, default timeout: 2 seconds
+        long timeoutMs = 2000L;

Review Comment:
   what is the magic 2000? why not 500 or 1000?



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