Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bigtable): Accept nil RowSet to read all rows #9327

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

bhshkh
Copy link
Contributor

@bhshkh bhshkh commented Jan 29, 2024

Issue: Conformance test failure at line

https://github.com/googleapis/cloud-bigtable-clients-test/blob/6b9ab96df64cf63898f8c1682a7e316aa23ef1b8/tests/readrows_test.go#L451-L453

:

=== RUN   TestReadRows_Retry_StreamReset
[Servr log] 2024/01/29 13:30:46 There is 10s sleep on the server side
    readrows_test.go:453: 
        	Error Trace:	cloud-bigtable-clients-test/tests/readrows_test.go:453
        	Error:      	Should be empty, but was []
        	Test:       	TestReadRows_Retry_StreamReset
--- FAIL: TestReadRows_Retry_StreamReset (5.42s)
FAIL
exit status 1
FAIL	github.com/googleapis/cloud-bigtable-clients-test/tests	5.906s

Cause:

In a read rows request, a row set can be passed to specify which rows need to be read. E.g.:
https://github.com/googleapis/cloud-bigtable-clients-test/blob/6b9ab96df64cf63898f8c1682a7e316aa23ef1b8/tests/readrows_test.go#L485-L491

In the TestReadRows_Retry_StreamReset test, no row set has been specified:
https://github.com/googleapis/cloud-bigtable-clients-test/blob/6b9ab96df64cf63898f8c1682a7e316aa23ef1b8/tests/readrows_test.go#L436
In such cases, when the client library receives the read row request, it should not pass any RowSet in the ReadRows RPC call to Bigtable service.

But the Go test proxy creates infinite range and calls the ReadRows method.

Fix:

  • Allow ReadRows to accept nil RowSet
  • Stop sending infinite range from Go test proxy

Logs after fix:

=== RUN   TestReadRows_Retry_StreamReset
[Servr log] 2024/01/29 13:31:27 There is 10s sleep on the server side
--- PASS: TestReadRows_Retry_StreamReset (5.48s)
PASS
ok  	github.com/googleapis/cloud-bigtable-clients-test/tests	6.992s

@bhshkh bhshkh requested review from a team as code owners January 29, 2024 21:44
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigtable Issues related to the Bigtable API. labels Jan 29, 2024
@bhshkh bhshkh marked this pull request as draft January 29, 2024 21:46
@bhshkh bhshkh marked this pull request as ready for review February 14, 2024 20:02
@product-auto-label product-auto-label bot added the stale: old Pull request is old and needs attention. label Feb 29, 2024
@bhshkh bhshkh enabled auto-merge (squash) March 13, 2024 12:43
@bhshkh bhshkh merged commit cd36506 into googleapis:main Mar 13, 2024
9 of 12 checks passed
@bhshkh bhshkh deleted the fix/cbt-conf-test-read-rows-1 branch March 13, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the Bigtable API. size: s Pull request size is small. stale: old Pull request is old and needs attention.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants