danny0405 commented on code in PR #12982:
URL: https://github.com/apache/hudi/pull/12982#discussion_r2026163536
##########
hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java:
##########
@@ -701,9 +704,9 @@ public final Stream<Pair<String, CompactionOperation>>
getPendingLogCompactionOp
@Override
public final Stream<HoodieBaseFile> getLatestBaseFiles(String partitionStr) {
try {
- readLock.lock();
String partitionPath = formatPartitionKey(partitionStr);
ensurePartitionLoadedCorrectly(partitionPath);
+ readLock.lock();
Review Comment:
Oops `ensurePartitionLoadedCorrectly(String partition)` has no
synchronization on `addedPartitions` while
`ensurePartitionsLoadedCorrectly(List<String> partitionList)` does, should we
unify the lock: remove the synchronized block in
`ensurePartitionsLoadedCorrectly` and add read lock for
`ensurePartitionLoadedCorrectly` to ensure the integrity of `addedPartitions` ?
--
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]