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


##########
fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudReplica.java:
##########
@@ -115,7 +113,6 @@ public CloudReplica(long replicaId, Long backendId, 
ReplicaState state, long ver
         this.dbId = dbId;
         this.tableId = tableId;
         this.partitionId = partitionId;
-        this.indexId = indexId;
         this.idx = idx;

Review Comment:
   The `indexId` constructor parameter is now ignored (no longer stored), but 
the signature still exposes it as a meaningful value. This can confuse callers 
and makes it easy to assume `CloudReplica` retains an index id when it no 
longer does. Consider either (a) renaming the parameter to something like 
`unusedIndexId` / adding an in-code comment explaining it is intentionally 
ignored for compatibility, and/or (b) introducing a new constructor overload 
without `indexId` and deprecating the old signature to guide new call sites.



##########
fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudReplica.java:
##########
@@ -586,10 +583,6 @@ public long getPartitionId() {
         return partitionId;
     }
 

Review Comment:
   `getIndexId()` was removed along with the backing field. Since 
`CloudReplica` is a public class and the PR description mentions keeping 
constructor parameters for source compatibility, removing a public getter is a 
source-breaking API change for any downstream callers. If compatibility is a 
goal, consider keeping `getIndexId()` as a deprecated method (documenting that 
it is no longer available / returns a sentinel) or providing a clear 
alternative accessor path for callers that previously relied on it.
   ```suggestion
   
       @Deprecated
       public long getIndexId() {
           return getIdx();
       }
   ```



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