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

ccl/streamingccl/streamclient: TestPartitionedStreamReplicationClient failed #103247

Closed
cockroach-teamcity opened this issue May 13, 2023 · 7 comments · Fixed by #105480
Closed
Assignees
Labels
branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. T-disaster-recovery
Milestone

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented May 13, 2023

ccl/streamingccl/streamclient.TestPartitionedStreamReplicationClient failed with artifacts on master @ 63eb6b86c1518fbed9db10e7d2afa1446b2b3b82:

      github.com/cockroachdb/cockroach/pkg/kv/range_lookup.go:331 +0x832
  github.com/cockroachdb/cockroach/pkg/kv.RangeLookup()
      github.com/cockroachdb/cockroach/pkg/kv/range_lookup.go:206 +0x315
  github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).RangeLookup()
      github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:589 +0x128
  github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.(*RangeCache).performRangeLookup()
      github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:1041 +0x3fe
  github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.tryLookupImpl.func1()
      github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:929 +0xc5
  github.com/cockroachdb/cockroach/pkg/util/contextutil.RunWithTimeout()
      github.com/cockroachdb/cockroach/pkg/util/contextutil/context.go:91 +0x142
  github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.tryLookupImpl()
      github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:926 +0x1a8
  github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.(*RangeCache).tryLookup.func3()
      github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:824 +0xd9
  github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight.(*Group).doCall.func1()
      github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight/singleflight.go:387 +0x51
  github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunTask()
      github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:305 +0x147
  github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight.(*Group).doCall()
      github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight/singleflight.go:386 +0x2a4
  github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight.(*Group).DoChan.func1()
      github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight/singleflight.go:356 +0xd0

Goroutine 611 (running) created at:
  github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx()
      github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:461 +0x619
  github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTask()
      github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:332 +0xb1e
  github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).Start()
      github.com/cockroachdb/cockroach/pkg/jobs/registry.go:1111 +0x993
  github.com/cockroachdb/cockroach/pkg/server.(*SQLServer).preStart()
      github.com/cockroachdb/cockroach/pkg/server/server_sql.go:1551 +0x12f6
  github.com/cockroachdb/cockroach/pkg/server.(*Server).PreStart()
      github.com/cockroachdb/cockroach/pkg/server/server.go:1917 +0x4fa4
  github.com/cockroachdb/cockroach/pkg/server.(*TestServer).Start()
      github.com/cockroachdb/cockroach/pkg/server/testserver.go:622 +0x8f
  github.com/cockroachdb/cockroach/pkg/testutils/serverutils.StartServer()
      github.com/cockroachdb/cockroach/pkg/testutils/serverutils/test_server_shim.go:352 +0x1e1
  github.com/cockroachdb/cockroach/pkg/testutils/serverutils.StartServer()
      github.com/cockroachdb/cockroach/pkg/testutils/serverutils/test_server_shim.go:347 +0xc4
  github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils.NewReplicationHelper()
      github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils/replication_helpers.go:197 +0x8e
  github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/streamclient_test.TestPartitionedStreamReplicationClient()
      github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/streamclient_test/pkg/ccl/streamingccl/streamclient/partitioned_stream_client_test.go:69 +0x3dc
  testing.tRunner()
      GOROOT/src/testing/testing.go:1446 +0x216
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1493 +0x47
==================

Parameters: TAGS=bazel,gss,race

Help

See also: How To Investigate a Go Test Failure (internal)

/cc @cockroachdb/disaster-recovery

This test on roachdash | Improve this report!

Jira issue: CRDB-27898

@cockroach-teamcity cockroach-teamcity added branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. T-disaster-recovery labels May 13, 2023
@cockroach-teamcity cockroach-teamcity added this to the 23.1 milestone May 13, 2023
@msbutler msbutler self-assigned this May 17, 2023
@msbutler
Copy link
Collaborator

On 23.1, I see the following race during test server startup using --stress --race

WARNING: DATA RACE
Read at 0x00c0011e5438 by goroutine 432:
  github.com/cockroachdb/cockroach/pkg/server.(*diskStatsMap).empty()
      github.com/cockroachdb/cockroach/pkg/server/node.go:897 +0x6c
  github.com/cockroachdb/cockroach/pkg/server.(*diskStatsMap).tryPopulateAdmissionDiskStats()
      github.com/cockroachdb/cockroach/pkg/server/node.go:870 +0xa7
  github.com/cockroachdb/cockroach/pkg/server.(*Node).GetPebbleMetrics()
      github.com/cockroachdb/cockroach/pkg/server/node.go:928 +0x104
  github.com/cockroachdb/cockroach/pkg/util/admission.(*StoreGrantCoordinators).SetPebbleMetricsProvider.func1()
      github.com/cockroachdb/cockroach/pkg/util/admission/grant_coordinator.go:107 +0x1e7

Previous write at 0x00c0011e5438 by goroutine 49:
  github.com/cockroachdb/cockroach/pkg/server.(*diskStatsMap).initDiskStatsMap()
      github.com/cockroachdb/cockroach/pkg/server/node.go:901 +0x90
  github.com/cockroachdb/cockroach/pkg/server.(*Node).registerEnginesForDiskStatsMap()
      github.com/cockroachdb/cockroach/pkg/server/node.go:921 +0x5c44
  github.com/cockroachdb/cockroach/pkg/server.(*Server).PreStart()
      github.com/cockroachdb/cockroach/pkg/server/server.go:1928 +0x5b85
  github.com/cockroachdb/cockroach/pkg/server.(*TestServer).Start()
      github.com/cockroachdb/cockroach/pkg/server/testserver.go:612 +0x8f
  github.com/cockroachdb/cockroach/pkg/testutils/serverutils.StartServer()
      github.com/cockroachdb/cockroach/pkg/testutils/serverutils/test_server_shim.go:330 +0x1b6
  github.com/cockroachdb/cockroach/pkg/testutils/serverutils.StartServer()
      github.com/cockroachdb/cockroach/pkg/testutils/serverutils/test_server_shim.go:325 +0x96
  github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils.NewReplicationHelper()
      github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils/replication_helpers.go:215 +0x8e
  github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/streamclient_test.TestPartitionedStreamReplicationClient()
      github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/streamclient_test/pkg/ccl/streamingccl/streamclient/partitioned_stream_client_test.go:69 +0x3d8
  testing.tRunner()
      GOROOT/src/testing/testing.go:1446 +0x216
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1493 +0x47

Goroutine 432 (running) created at:
  github.com/cockroachdb/cockroach/pkg/util/admission.(*StoreGrantCoordinators).SetPebbleMetricsProvider()
      github.com/cockroachdb/cockroach/pkg/util/admission/grant_coordinator.go:98 +0x329
  github.com/cockroachdb/cockroach/pkg/server.(*Server).PreStart()
      github.com/cockroachdb/cockroach/pkg/server/server.go:1804 +0x45bb
  github.com/cockroachdb/cockroach/pkg/server.(*TestServer).Start()
      github.com/cockroachdb/cockroach/pkg/server/testserver.go:612 +0x8f
  github.com/cockroachdb/cockroach/pkg/testutils/serverutils.StartServer()
      github.com/cockroachdb/cockroach/pkg/testutils/serverutils/test_server_shim.go:330 +0x1b6
  github.com/cockroachdb/cockroach/pkg/testutils/serverutils.StartServer()
      github.com/cockroachdb/cockroach/pkg/testutils/serverutils/test_server_shim.go:325 +0x96
  github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils.NewReplicationHelper()
      github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils/replication_helpers.go:215 +0x8e
  github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/streamclient_test.TestPartitionedStreamReplicationClient()
      github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/streamclient_test/pkg/ccl/streamingccl/streamclient/partitioned_stream_client_test.go:69 +0x3d8
  testing.tRunner()
      GOROOT/src/testing/testing.go:1446 +0x216
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1493 +0x47

@exalate-issue-sync exalate-issue-sync bot assigned stevendanna and unassigned msbutler Jun 9, 2023
@stevendanna
Copy link
Collaborator

Gonna go ahead and steal this one as I have a number of race-type things to look at atm.

@stevendanna
Copy link
Collaborator

These look like two pretty different data races. I've stressed this for a couple of hours and haven't reproduced it yet.

@lidorcarmel
Copy link
Contributor

@msbutler the race you pasted should have been fixed in #91414 I think.
any chance you were running on maybe 23.1.0? or maybe the branch was not up to date? the fix was backported on Apr 11.

anyway I'm stressing the test now, and I'll look at the first race above.

@msbutler
Copy link
Collaborator

I saw the race on master on a PR rebased up to june 13

@lidorcarmel
Copy link
Contributor

I saw the race on master on a PR rebased up to june 13

above you say 23.1?
anyway it should be a separate issue, if you think it's not fixed then let's open one.

@lidorcarmel
Copy link
Contributor

the first race above looks like a dup of #104791
see also #103687
therefore closing.
this is the stack from the TC link:

 === RUN   TestPartitionedStreamReplicationClient
07:15:54         test_log_scope.go:161: test logs captured to: /artifacts/tmp/_tmp/34268274a8b0e243fb611a3a46389ea6/logTestPartitionedStreamReplicationClient308498288
07:15:54         test_log_scope.go:79: use -show-logs to present logs inline
07:15:54         partitioned_stream_client_test.go:105: using inline certificates
07:15:54     ==================
07:15:54     WARNING: DATA RACE
07:15:54     Read at 0x00c005da0e90 by goroutine 305:
07:15:54       reflect.Value.IsNil()
07:15:54           GOROOT/src/reflect/value.go:1546 +0x455
07:15:54       encoding/json.isEmptyValue()
07:15:54           GOROOT/src/encoding/json/encode.go:353 +0x411
07:15:54       encoding/json.structEncoder.encode()
07:15:54           GOROOT/src/encoding/json/encode.go:749 +0x169
07:15:54       encoding/json.structEncoder.encode-fm()
07:15:54           <autogenerated>:1 +0xdb
07:15:54       encoding/json.ptrEncoder.encode()
07:15:54           GOROOT/src/encoding/json/encode.go:944 +0x3c2
07:15:54       encoding/json.ptrEncoder.encode-fm()
07:15:54           <autogenerated>:1 +0x90
07:15:54       encoding/json.(*encodeState).reflectValue()
07:15:54           GOROOT/src/encoding/json/encode.go:359 +0x88
07:15:54       encoding/json.interfaceEncoder()
07:15:54           GOROOT/src/encoding/json/encode.go:715 +0x17b
07:15:54       encoding/json.structEncoder.encode()
07:15:54           GOROOT/src/encoding/json/encode.go:760 +0x2ba
07:15:54       encoding/json.structEncoder.encode-fm()
07:15:54           <autogenerated>:1 +0xdb
07:15:54       encoding/json.arrayEncoder.encode()
07:15:54           GOROOT/src/encoding/json/encode.go:915 +0x10e
07:15:54       encoding/json.arrayEncoder.encode-fm()
07:15:54           <autogenerated>:1 +0x90
07:15:54       encoding/json.sliceEncoder.encode()
07:15:54           GOROOT/src/encoding/json/encode.go:888 +0x4e2
07:15:54       encoding/json.sliceEncoder.encode-fm()
07:15:54           <autogenerated>:1 +0x90
07:15:54       encoding/json.structEncoder.encode()
07:15:54           GOROOT/src/encoding/json/encode.go:760 +0x2ba
07:15:54       encoding/json.structEncoder.encode-fm()
07:15:54           <autogenerated>:1 +0xdb
07:15:54       encoding/json.ptrEncoder.encode()
07:15:54           GOROOT/src/encoding/json/encode.go:944 +0x3c2
07:15:54       encoding/json.ptrEncoder.encode-fm()
07:15:54           <autogenerated>:1 +0x90
07:15:54       encoding/json.(*encodeState).reflectValue()
07:15:54           GOROOT/src/encoding/json/encode.go:359 +0x88
07:15:54       encoding/json.(*encodeState).marshal()
07:15:54           GOROOT/src/encoding/json/encode.go:331 +0x20b
07:15:54       encoding/json.(*Encoder).Encode()
07:15:54           GOROOT/src/encoding/json/stream.go:206 +0xcf
07:15:54       github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.GRPCTransportFactory.func1()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/transport_race.go:120 +0x2c4
07:15:54       github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2()
07:15:54           github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:470 +0x1f6
07:15:54     
07:15:54     Previous write at 0x00c005da0e90 by goroutine 611:
07:15:54       github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*txnSpanRefresher).splitEndTxnAndRetrySend()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go:399 +0x764
07:15:54       github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*txnSpanRefresher).maybeRefreshAndRetrySend()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go:325 +0x5b2
07:15:54       github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*txnSpanRefresher).sendLockedWithRefreshAttempts()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go:275 +0x7bd
07:15:54       github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*txnSpanRefresher).SendLocked()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go:148 +0x1e6
07:15:54       github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*txnPipeliner).SendLocked()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/txn_interceptor_pipeliner.go:291 +0x245
07:15:54       github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*txnSeqNumAllocator).SendLocked()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/txn_interceptor_seq_num_allocator.go:105 +0xd4
07:15:54       github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*txnHeartbeater).SendLocked()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/txn_interceptor_heartbeater.go:246 +0x7cc
07:15:54       github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*TxnCoordSender).Send()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/txn_coord_sender.go:526 +0x9b2
07:15:54       github.com/cockroachdb/cockroach/pkg/kv.(*DB).sendUsingSender()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/db.go:1006 +0x190
07:15:54       github.com/cockroachdb/cockroach/pkg/kv.(*Txn).Send()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/txn.go:1091 +0x334
07:15:54       github.com/cockroachdb/cockroach/pkg/kv.(*Txn).commit()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/txn.go:707 +0x224
07:15:54       github.com/cockroachdb/cockroach/pkg/kv.(*Txn).Commit()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/txn.go:722 +0xaf
07:15:54       github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).commitSQLTransactionInternal()
07:15:54           github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1344 +0x7aa
07:15:54     FAIL: //pkg/ccl/streamingccl/streamclient:streamclient_test (see /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/execroot/com_github_cockroachdb_cockroach/bazel-out/k8-fastbuild/testlogs/pkg/ccl/streamingccl/streamclient/streamclient_test/test.log)
07:15:54       github.com/cockroachdb/cockroach/pkg/sql.(*InternalExecutor).commitTxn()
07:15:54           github.com/cockroachdb/cockroach/pkg/sql/internal.go:1200 +0x848
07:15:54       github.com/cockroachdb/cockroach/pkg/sql.(*InternalDB).newInternalExecutorWithTxn.func1()
07:15:54           github.com/cockroachdb/cockroach/pkg/sql/internal.go:1612 +0xe9
07:15:54       github.com/cockroachdb/cockroach/pkg/sql.(*InternalDB).txn.func4()
07:15:54           github.com/cockroachdb/cockroach/pkg/sql/internal.go:1738 +0x62b
07:15:54       github.com/cockroachdb/cockroach/pkg/kv.runTxn.func1()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/db.go:970 +0x51
07:15:54       github.com/cockroachdb/cockroach/pkg/kv.(*Txn).exec()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/txn.go:950 +0xb0
07:15:54       github.com/cockroachdb/cockroach/pkg/kv.runTxn()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/db.go:969 +0x90
07:15:54       github.com/cockroachdb/cockroach/pkg/kv.(*DB).TxnWithAdmissionControl()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/db.go:932 +0xf0
07:15:54       github.com/cockroachdb/cockroach/pkg/kv.(*DB).Txn()
07:15:54           github.com/cockroachdb/cockroach/pkg/kv/db.go:907 +0x51
07:15:54       github.com/cockroachdb/cockroach/pkg/kv.(*DB).Txn-fm()
07:15:54           <autogenerated>:1 +0x64
07:15:54       github.com/cockroachdb/cockroach/pkg/sql.(*InternalDB).txn()
07:15:54           github.com/cockroachdb/cockroach/pkg/sql/internal.go:1717 +0x5fa
07:15:54       github.com/cockroachdb/cockroach/pkg/sql.(*InternalDB).Txn()
07:15:54           github.com/cockroachdb/cockroach/pkg/sql/internal.go:1652 +0xf0
07:15:54       github.com/cockroachdb/cockroach/pkg/sql.(*internalDBWithOverrides).Txn()
07:15:54           github.com/cockroachdb/cockroach/pkg/sql/internal.go:1793 +0x13d
07:15:54       github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).servePauseAndCancelRequests()
07:15:54           github.com/cockroachdb/cockroach/pkg/jobs/adopt.go:541 +0x129
07:15:54       github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).Start.func3()
07:15:54           github.com/cockroachdb/cockroach/pkg/jobs/registry.go:1045 +0x85
07:15:54       github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).Start.func4()
07:15:54           github.com/cockroachdb/cockroach/pkg/jobs/registry.go:1052 +0xb0
07:15:54       github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).withSession()
07:15:54           github.com/cockroachdb/cockroach/pkg/jobs/registry.go:1000 +0x301
07:15:54       github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).Start.func11()
07:15:54           github.com/cockroachdb/cockroach/pkg/jobs/registry.go:1016 +0x52
07:15:54       github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).Start.func8()
07:15:54           github.com/cockroachdb/cockroach/pkg/jobs/registry.go:1134 +0x456
07:15:54       github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2()
07:15:54           github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:470 +0x1f6

nvanbenschoten added a commit to nvanbenschoten/cockroach that referenced this issue Jun 24, 2023
Fixes cockroachdb#103687.
Fixes cockroachdb#103247.
Fixes cockroachdb#104791.

This commit avoids a data race between `splitEndTxnAndRetrySend` and
`raceTransport` by avoiding a mutation of a shared `RequestUnion_EndTxn`
object within an unshared `RequestUnion` object. The `raceTransport`
makes an effort to copy the `BatchRequest`'s `RequestUnion` slice, but
it does not copy the inner interface, so we can't play tricks to avoid a
reallocation of the `RequestUnion_EndTxn`.

The commit also addresses a similar problem in
`retryTxnCommitAfterFailedParallelCommit`.

We may be able to fix this in the `raceTransport`, but doing so would
require some reflection magic and this is currently failing CI, so we
make the easier change.

Release note: None
craig bot pushed a commit that referenced this issue Jun 26, 2023
105391: colinfo: add version gate for storing pg_lsn types r=rafiss a=otan

We don't want mixed version clusters storing pg_lsn types, in case they need to rollback / older versions do not understand the type.

Informs #105130

Release note: None

105444: systemschema: stop running PostDeserializationChanges when building tables r=Xiang-Gu a=rafiss

### systemschema: add JobInfo to MakeSystemTables helper

This table was missing from the list, and the expected count of tables
was off since we weren't accounting for non-system tenant tables.

The function is only used for testing, so there was no impact.

---

### systemschema: stop running PostDeserializationChanges when building tables

We would like to remove old PostDeserializationChanges that are no
longer needed. In order to do so, we need to stop relying on them to
build system tables.

Instead, now we adjust the hard-coded system table descriptors and the
related helpers so that they create valid descriptors. This needed two
changes:
- Update the ConstraintID for check constraints.
- Update the primary index encoding so that it includes stored columns.

---

Epic: None
Release note: None

105476: kv: fix data race when updating pending txn in txnStatusCache r=arulajmani a=nvanbenschoten

Fixes #105244.

This commit avoids a data race by treating *roachpb.Transaction objects as immutable, and simply choosing the right transaction to keep in the cache when there is a choice to be made.

The behavior of this logic is tested by `TestTxnCacheUpdatesTxn`.

Release note: None

105480: kv: fix data race during retry of EndTxn after refresh r=arulajmani a=nvanbenschoten

Fixes #103687.
Fixes #103247.
Fixes #104791.

This commit avoids a data race between `splitEndTxnAndRetrySend` and `raceTransport` by avoiding a mutation of a shared `RequestUnion_EndTxn` object within an unshared `RequestUnion` object. The `raceTransport` makes an effort to copy the `BatchRequest`'s `RequestUnion` slice, but it does not copy the inner interface, so we can't play tricks to avoid a reallocation of the `RequestUnion_EndTxn`.

The commit also addresses a similar problem in
`retryTxnCommitAfterFailedParallelCommit`.

We may be able to fix this in the `raceTransport`, but doing so would require some reflection magic and this is currently failing CI, so we make the easier change.

Release note: None

105515: pgwire: fix race in TestConn r=knz a=rafiss

fixes #105410

A recent refactor introduced this race, since the context is used by two testing goroutines.

Release note: None

Co-authored-by: Oliver Tan <[email protected]>
Co-authored-by: Rafi Shamim <[email protected]>
Co-authored-by: Nathan VanBenschoten <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. T-disaster-recovery
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants