googleapis / googleapis/google-cloud-java

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

未关闭
#13,079 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
api: bigtable
主要语言
Java
星标
2.1k
派生
1.2k
平均合并
1 天 23 小时
30 天内合并 PR
154

描述

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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。