Abacn commented on code in PR #24403:
URL: https://github.com/apache/beam/pull/24403#discussion_r1035389116
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/datastore/DatastoreV1.java:
##########
@@ -1579,7 +1579,7 @@ public void finishBundle() throws Exception {
* @throws DatastoreException if the commit fails or IOException or
InterruptedException if
* backing off between retries fails.
*/
- private void flushBatch() throws DatastoreException, IOException,
InterruptedException {
+ synchronized private void flushBatch() throws DatastoreException,
IOException, InterruptedException {
Review Comment:
As uniqueMutationKeys start working and flushBatch() is possible to get
called, I am concerned about this apparently not thread-safe method. Within in
bundle do we guarantee a processElement() being executed at the same time?
--
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]