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

test(bigtable): Fix conformance test TestReadRows_NoRetry_ErrorAfterLastRow #10213

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bhshkh
Copy link
Contributor

@bhshkh bhshkh commented May 16, 2024

Tracking bug: b/303943537

This PR fixes TestReadRows_Retry_LastScannedRow_Reverse test

https://github.com/googleapis/cloud-bigtable-clients-test/blob/db4d6a9e8e5e38b6f07383bd46ac14bfc8d8b9b6/tests/readrows_test.go#L171-L173

fails with error:

--- FAIL: TestReadRows_NoRetry_ErrorAfterLastRow (0.03s)
    readrows_test.go:201: 
        	Error Trace:	cloud-bigtable-clients-test/tests/readrows_test.go:201
        	Error:      	Not equal: 
        	            	expected: 1
        	            	actual  : 2
        	Test:       	TestReadRows_NoRetry_ErrorAfterLastRow
--- FAIL: TestReadRows_Retry_LastScannedRow_Reverse (0.04s)

The test sends below request to Go Bigtable proxy:

Request: &btpb.ReadRowsRequest{
	TableName: buildTableName("table"),
	RowsLimit: 1,
},

On receiving the request, the proxy creates a ReadRows request for the client library and invokes ReadRows function.
Even though test sends RowsLimit field in the method, the proxy does not add it to the client library request. This has been fixed in this PR.

@product-auto-label product-auto-label bot added the api: bigtable Issues related to the Bigtable API. label May 16, 2024
@codyoss
Copy link
Member

codyoss commented Dec 10, 2024

@bhshkh is this still wanted/needed?

@bhshkh bhshkh changed the title test(bigtable): test(bigtable): Fix conformance test TestReadRows_NoRetry_ErrorAfterLastRow Dec 11, 2024
@bhshkh
Copy link
Contributor Author

bhshkh commented Dec 11, 2024

@bhshkh is this still wanted/needed?

Yes

@bhshkh bhshkh marked this pull request as ready for review December 11, 2024 19:32
@bhshkh bhshkh requested review from a team as code owners December 11, 2024 19:32
rowsToRead = int64(req.GetCancelAfterRows())
}

// Client libray does not have a built-in way to limit the number of rows read in a call to Table.ReadRows().
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not ideal, is this a limitation with go? the proto should allow us to set the row limit, and the client should track how many rows are read.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants