Skip to content

Commit

Permalink
[BUG][Connector-V2] Iceberg source lost data with parallelism option (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kangdw0x80 authored Oct 28, 2023
1 parent 4617423 commit 7f3b4be
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected void refreshPendingSplits() {
private void addPendingSplits(Collection<IcebergFileScanTaskSplit> newSplits) {
int numReaders = context.currentParallelism();
for (IcebergFileScanTaskSplit newSplit : newSplits) {
int ownerReader = newSplit.splitId().hashCode() % numReaders;
int ownerReader = (newSplit.splitId().hashCode() & Integer.MAX_VALUE) % numReaders;
pendingSplits.computeIfAbsent(ownerReader, r -> new ArrayList<>()).add(newSplit);
log.info("Assigning {} to {} reader.", newSplit, ownerReader);
}
Expand Down

0 comments on commit 7f3b4be

Please sign in to comment.