leonardBang commented on code in PR #1897:
URL: https://github.com/apache/fluss/pull/1897#discussion_r2476592530
##########
fluss-client/src/main/java/org/apache/fluss/client/table/scanner/log/LogFetcher.java:
##########
@@ -502,8 +503,9 @@ private List<TableBucket> fetchableBuckets() {
}
private Integer getTableBucketLeader(TableBucket tableBucket) {
- if (metadataUpdater.getBucketLocation(tableBucket).isPresent()) {
- BucketLocation bucketLocation =
metadataUpdater.getBucketLocation(tableBucket).get();
+ Optional<BucketLocation> bucketLocationOpt =
metadataUpdater.getBucketLocation(tableBucket);
Review Comment:
IIUC, here we want to call `metadataUpdater.getBucketLocation` once to make
sure the status consistence. Could you change the commit message to
`[hotfix][client] Fix potential metadata inconsistency by deduplicating
getBucketLocation call` ?
Btw, we can also search similar places in client.
--
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]