JayajP commented on code in PR #30320:
URL: https://github.com/apache/beam/pull/30320#discussion_r1493041680


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQuerySinkMetrics.java:
##########
@@ -326,6 +337,83 @@ public static void reportFailedRPCMetrics(
     updateRpcLatencyMetric(c, method);
   }
 
+  /**
+   * Results of a batch of InsertAll RPCs. Used to update metrics with the 
{@code
+   * updateStreamingInsertsMetrics} method. Member variables should be 
thread-safe.
+   */
+  public static class StreamingInsertsResults {

Review Comment:
   Added a more nuanced comment about the thread safety guarantees of this 
class. 



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryServicesImpl.java:
##########
@@ -1258,6 +1278,10 @@ <T> long insertAll(
           }
         }
       }
+      streamingInsertsResults.failedRowsCount.getAndAdd(allErrors.size());

Review Comment:
   Done.



-- 
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]

Reply via email to