ahmedabu98 commented on issue #33497: URL: https://github.com/apache/beam/issues/33497#issuecomment-2580614117
Ahh the problem is that we're using a single PartitionKey object to [resolve partitions](https://github.com/apache/beam/blob/4fc5c869843e9439b3c73f80480d9b9ef651858a/sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/RecordWriterManager.java#L157-L162), and using the same object to [create writers](https://github.com/apache/beam/blob/4fc5c869843e9439b3c73f80480d9b9ef651858a/sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/RecordWriterManager.java#L178). What ends up happening is a race condition on which partition we resolve to by the end of the bundle. That partition value gets set for all writers in that partition. Instead, we should be making one copy of partitionKey for each new writer. -- 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]
