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

spanner: examine test results for RequestIDHeader when environment variable GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS=true #11308

Open
1 of 2 tasks
odeke-em opened this issue Dec 18, 2024 · 0 comments
Assignees
Labels
api: spanner Issues related to the Spanner API. triage me I really want to be triaged.

Comments

@odeke-em
Copy link
Contributor

odeke-em commented Dec 18, 2024

Reported to me offline by @rahul2393 and I ran tests to find failures due to the oddities which happen with multiplexed sessions and also seeming inconsistencies like only being enabled for ReadOnlyTransactions and pure WriteTransactions on main

$ GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS=true go test -short -run=.
2024/12/18 05:24:42 Integration tests skipped in -short mode.
--- FAIL: TestRequestIDHeader_onRetriesWithFailedTransactionCommit (0.01s)
    request_id_header_test.go:494: unaryClientCall is incorrect; got=6 want=5
--- FAIL: TestRequestIDHeader_SingleUseReadOnly_ExecuteStreamingSql_Unavailable (0.02s)
    request_id_header_test.go:1512: unaryClientCall is incorrect; got=2 want=1
    request_id_header_test.go:1536: RequestID unary segments mismatch: got - want +
          []*spanner.requestIDSegments{
          	&{
          		... // 2 identical fields
          		ClientID:  54,
          		RequestNo: 1,
        - 		ChannelID: 2,
        + 		ChannelID: 1,
          		RPCNo:     1,
          	},
        - 	s"1.10766896037511722208.54.1.2.1",
          }
--- FAIL: TestRequestIDHeader_SingleUseReadOnly_ExecuteStreamingSql_UnavailableDuringStream (0.05s)
    request_id_header_test.go:1842: unaryClientCall is incorrect; got=2 want=1
    request_id_header_test.go:1862: RequestID unary segments mismatch: got - want +
          []*spanner.requestIDSegments{
          	&{
          		... // 2 identical fields
          		ClientID:  49,
          		RequestNo: 1,
        - 		ChannelID: 2,
        + 		ChannelID: 1,
          		RPCNo:     1,
          	},
        - 	s"1.10766896037511722208.49.1.2.1",
          }
--- FAIL: TestRequestIDHeader_BatchCreateSessions_Unavailable (0.01s)
    request_id_header_test.go:1426: got 3 requests, want 4 requests:
        got:
        *spannerpb.CreateSessionRequest: database:"projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]"  session:{multiplexed:true}]
        *spannerpb.BatchCreateSessionsRequest: database:"projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]"  session_template:{}  session_count:2]
        *spannerpb.ExecuteSqlRequest: session:"projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/multiplexed-3"  transaction:{single_use:{read_only:{strong:true  return_read_timestamp:true}}}  sql:"SELECT FOO FROM BAR"  params:{}  seqno:1  query_options:{}  request_options:{}]
        
        want:
        *spannerpb.CreateSessionRequest: ]
        *spannerpb.BatchCreateSessionsRequest: ]
        *spannerpb.BatchCreateSessionsRequest: ]
        *spannerpb.ExecuteSqlRequest: ]
        
--- FAIL: TestRequestIDHeader_ReadWriteTransactionUpdate (0.01s)
    request_id_header_test.go:1098: unaryClientCall is incorrect; got=7 want=6
--- FAIL: TestRequestIDHeader_ReadWriteTransactionBatchUpdateWithOptions (0.02s)
    request_id_header_test.go:1157: unaryClientCall is incorrect; got=5 want=4
--- FAIL: TestRequestIDHeader_ClientBatchWriteWithError (0.02s)
    request_id_header_test.go:840: unaryClientCall is incorrect; got=2 want=1
--- FAIL: TestRequestIDHeader_PartitionQueryWithError (0.03s)
    request_id_header_test.go:973: unaryClientCall is incorrect; got=5 want=4
--- FAIL: TestRequestIDHeader_clientBatchWrite (0.02s)
    request_id_header_test.go:711: unaryClientCall is incorrect; got=2 want=1
--- FAIL: TestRequestIDHeader_ClientBatchWriteWithSessionNotFound (0.04s)
    request_id_header_test.go:775: unaryClientCall is incorrect; got=2 want=1
--- FAIL: TestRequestIDHeader_PartitionQueryWithoutError (0.04s)
    request_id_header_test.go:1015: unaryClientCall is incorrect; got=5 want=4
--- FAIL: TestRequestIDHeader_BatchDMLWithMultipleDML (0.03s)
    request_id_header_test.go:653: unaryClientCall is incorrect; got=7 want=6
--- FAIL: TestRequestIDHeader_retriesOnSessionNotFound (0.04s)
    request_id_header_test.go:573: unaryClientCall is incorrect; got=7 want=8
--- FAIL: TestRequestIDHeader_RetryOnAbortAndValidate (0.60s)
    request_id_header_test.go:1351: unaryClientCall is incorrect; got=7 want=6
    request_id_header_test.go:1376: RequestID segments mismatch: got - want +
          []*spanner.requestIDSegments{
          	&{
          		... // 2 identical fields
          		ClientID:  57,
          		RequestNo: 1,
        - 		ChannelID: 2,
        + 		ChannelID: 1,
          		RPCNo:     1,
          	},
          	&{Version: 1, ProcessID: "10766896037511722208", ClientID: 57, RequestNo: 2, ...},
          	&{Version: 1, ProcessID: "10766896037511722208", ClientID: 57, RequestNo: 3, ...},
          	&{
          		Version:   1,
          		ProcessID: "10766896037511722208",
          		ClientID:  57,
        - 		RequestNo: 4,
        + 		RequestNo: 3,
          		ChannelID: 1,
        - 		RPCNo:     1,
        + 		RPCNo:     2,
          	},
          	&{
          		Version:   1,
          		ProcessID: "10766896037511722208",
          		ClientID:  57,
        - 		RequestNo: 4,
        + 		RequestNo: 3,
          		ChannelID: 1,
        - 		RPCNo:     2,
        + 		RPCNo:     3,
          	},
          	&{
          		Version:   1,
          		ProcessID: "10766896037511722208",
          		ClientID:  57,
        - 		RequestNo: 4,
        + 		RequestNo: 3,
          		ChannelID: 1,
        - 		RPCNo:     3,
        + 		RPCNo:     4,
          	},
        - 	s"1.10766896037511722208.57.1.4.4",
          }
FAIL
exit status 1
FAIL	cloud.google.com/go/spanner	5.210s

Remedies

@odeke-em odeke-em added the triage me I really want to be triaged. label Dec 18, 2024
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Dec 18, 2024
odeke-em added a commit to orijtech/google-cloud-go that referenced this issue Dec 18, 2024
Temporarily skip RequestIDHeader tests if environment variable

    GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS=true

is set. This ensures that normal development can go on without
breaking CI/CD for other developers of this repository.

Updates googleapis#11308
odeke-em added a commit to orijtech/google-cloud-go that referenced this issue Dec 18, 2024
…xedSessions

Temporarily skip RequestIDHeader tests if environment variable

    GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS=true

is set. This ensures that normal development can go on without
breaking CI/CD for other developers of this repository.

Updates googleapis#11308
odeke-em added a commit to orijtech/google-cloud-go that referenced this issue Dec 18, 2024
…xedSessions

Temporarily skip RequestIDHeader tests if environment variable

    GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS=true

is set. This ensures that normal development can go on without
breaking CI/CD for other developers of this repository.

Updates googleapis#11308
rahul2393 pushed a commit that referenced this issue Dec 18, 2024
…xedSessions (#11309)

Temporarily skip RequestIDHeader tests if environment variable

    GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS=true

is set. This ensures that normal development can go on without
breaking CI/CD for other developers of this repository.

Updates #11308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants