m-trieu commented on code in PR #30320:
URL: https://github.com/apache/beam/pull/30320#discussion_r1491496488
##########
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:
if this is a data class, can you use AutoValue?
https://g3doc.corp.google.com/third_party/java_src/auto/value/g3doc/index.md?cl=head
can also annotate with `@ThreadSafe` instead of commenting
also the members are threadsafe individually, but if you need atomic
operations across multiple members that will still require a lock
(`synchronized (someObject)`)
--
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]