googleapis / googleapis/google-cloud-java

[java-bigtable] client side metric for ReadRows request tagged with "undefined" table id

Open
#13,079 0 comments 0 reactions 0 assignees View on GitHub
api: bigtable
Dominant language
Java
Stars
2.1k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
154

Description

For ReadRows request, when we received a retryable exception at the end of the stream after consuming all the rows, the client will initiate a new attempt RPC which has a [fake ReadRowsRequest](https://github.com/googleapis/java-bigtable/blob/main/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryCompletedCallable.java#L54-L57). This is fine in the most cases because the request is not actually getting send to the server and the returned response is correct.

However, when client side metrics is enabled, this would show up as an extra client RPC with `cluster_id=unspecified`, `zone_id=global`, `table_id=undefined`, and `status=OK`: https://screenshot.googleplex.com/B6HqQdHMJduK5XP. The cluster_id and zone_id are unspecified because no request is send to server so nothing is returned, the table_id is undefined because we skipped setting table name in the [fake FULFILLED_REQUEST_MARKER request](https://github.com/googleapis/java-bigtable/blob/main/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryCompletedCallable.java#L42).

This could be confusing because usually when cluster_id is unspecified it means the request failed before it reaches Bigtable server, in which case the status would be OK. And table_id should never be undefined because we get the table_id from the request.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.