Zerolzj commented on code in PR #10662:
URL: https://github.com/apache/paimon/pull/10662#discussion_r4346563463
##########
paimon-core/src/main/java/org/apache/paimon/operation/BucketSelector.java:
##########
@@ -136,7 +160,9 @@ private Optional<PartitionSelector>
createPartitionSelector(Predicate bucketPred
@SuppressWarnings("unchecked")
List<Object>[] bucketValues = new List[bucketKeyType.getFieldCount()];
- BucketFunction bucketFunction =
BucketFunction.create(bucketFunctionType, bucketKeyType);
+ // Factory discovery is cached by ClassLoader; functions need not be
safe to share
+ // across concurrent partition selectors.
+ BucketFunction bucketFunction = BucketFunction.create(coreOptions,
bucketKeyType);
Review Comment:
Updated in 82ecc32267134291792f6e729ce586541c4e9c0c. Only createBucketSet is
synchronized, so different bucket-count cache misses cannot invoke the retained
function concurrently, while cache hits remain outside the monitor. Provider
discovery and ClassLoader handling are unchanged.
Added a real-table regression using committed overwrites at bucket counts 2
-> 3 -> 4 and manifest parallelism 4. An overlap-detecting deterministic
provider fails the unchanged implementation with Concurrent bucket function
invocation; the fixed scan reads exactly the expected row. The 101 targeted
Core tests pass on both JDK 8 and JDK 17 with normal checks enabled. Remote CI
is pending; this does not claim the unrelated timeout is fixed.
--
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]