[ 
https://issues.apache.org/jira/browse/BEAM-14121?focusedWorklogId=775871&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-775871
 ]

ASF GitHub Bot logged work on BEAM-14121:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/May/22 11:39
            Start Date: 30/May/22 11:39
    Worklog Time Spent: 10m 
      Work Description: nielm commented on code in PR #17335:
URL: https://github.com/apache/beam/pull/17335#discussion_r884735083


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerIO.java:
##########
@@ -377,6 +382,12 @@ public class SpannerIO {
   // Multiple of mutation size to use to gather and sort mutations
   private static final int DEFAULT_GROUPING_FACTOR = 1000;
 
+  // Size of caches for read/write ServiceCallMetric objects .
+  // This is a reasonable limit, as for reads, each worker will process very 
few different table
+  // read requests, and for writes, batching will ensure that write operations 
for the same
+  // table occur at
+  public static final int METRICS_CACHE_SIZE = 100;

Review Comment:
   yes, fixed





Issue Time Tracking
-------------------

            Worklog Id:     (was: 775871)
    Remaining Estimate: 36.5h  (was: 36h 40m)
            Time Spent: 3.5h  (was: 3h 20m)

> Incorrect Spanner IO Request Count metrics
> ------------------------------------------
>
>                 Key: BEAM-14121
>                 URL: https://issues.apache.org/jira/browse/BEAM-14121
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-gcp
>    Affects Versions: 2.34.0
>            Reporter: Niel Markwick
>            Assignee: Niel Markwick
>            Priority: P2
>              Labels: google-cloud-spanner
>   Original Estimate: 40h
>          Time Spent: 3.5h
>  Remaining Estimate: 36.5h
>
> IO request count metrics calculated incorrectly for GCP Spanner
>  
> Resource ID is formulated incorrectly
> *Spanner Table:*
> {{//spanner.googleapis.com/projects/\{projectId}/{*}topics{*}/\{databaseId}/tables/\{tableId}}}
> should be
> {{//spanner.googleapis.com/projects/\{projectId}/instances/\{instanceId}/databases/\{databaseId}/tables/\{tableId}}}
> and is populated incorrectly – instance ID is used in place of tableID
> Spanner SQL Query:
> {{//spanner.googleapis.com/projects/\{projectId}/queries/\{queryName} }}
> {{should be}}
> {{{}//spanner.googleapis.com/projects/\{projectId}/{}}}{{{}instances/\{instanceId}/queries{}}}{{{}/\{queryName}
>  {}}}
> and queryName is nullable which cause issued downstream
> this is not actually populated at all - queries are logged as reads on an 
> instance. 



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to