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

kvserver: raft{Request->Receive}Queue #80619

Merged
merged 1 commit into from
Apr 27, 2022
Merged

Conversation

tbg
Copy link
Member

@tbg tbg commented Apr 27, 2022

This clarifies that this queue holds received raft messages (not
messages waiting to be sent).

These changes were mechanical, via Goland.

Release note: None

This clarifies that this queue holds received raft messages (not
messages waiting to be sent).

Release note: None
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@tbg tbg marked this pull request as ready for review April 27, 2022 09:08
@tbg tbg requested a review from a team as a code owner April 27, 2022 09:08
@tbg tbg requested a review from erikgrinaker April 27, 2022 09:08
@tbg
Copy link
Member Author

tbg commented Apr 27, 2022

bors r=erikgrinaker
TFTQR!

@craig
Copy link
Contributor

craig bot commented Apr 27, 2022

Build failed:

@tbg
Copy link
Member Author

tbg commented Apr 27, 2022

goroutine 631830 [chan receive, 57 minutes]:
github.com/cockroachdb/cockroach/pkg/testutils/testcluster.(*TestCluster).WaitForNStores(0xc00528ca00, {0x9b15680, 0xc0044d21a0}, 0x4, 0x0)
	/go/src/github.com/cockroachdb/cockroach/pkg/testutils/testcluster/testcluster.go:538 +0x2ff
github.com/cockroachdb/cockroach/pkg/kv/kvserver_test.TestGossipHandlesReplacedNode(0xc0044d21a0)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/gossip_test.go:199 +0x77c
testing.tRunner(0xc0044d21a0, 0x680e918)
	/usr/local/go/src/testing/testing.go:1259 +0x230
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1306 +0x727

Now I'm not sure if it's related, but we're seeing mvccGC get tripped up on the spanset checks repeatedly, and this is on the liveness range:

E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578  cannot ‹read› undeclared span ‹/{Min-System/NodeLiveness/2}›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +declared:
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹read local: /Local/Range/System/NodeLiveness/RangeDescriptor at 0,0›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹read local: /Local/Lock/Intent/Local/Range/System/NodeLiveness/RangeDescriptor at 0,0›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹write global: /System/NodeLiveness/1 at 1651055373.590339728,0›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹write global: /System/NodeLiveness/2 at 1651055373.590339728,0›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹write global: /System/NodeLiveness/3 at 1651055373.590339728,0›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹write local: /Local/Range/System/NodeLiveness/RangeDescriptor at 0,0›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹write local: /Local/Lock/Intent/System/NodeLiveness/1 at 0,0›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹write local: /Local/Lock/Intent/System/NodeLiveness/2 at 0,0›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹write local: /Local/Lock/Intent/System/NodeLiveness/3 at 0,0›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹write local: /Local/Lock/Intent/Local/Range/System/NodeLiveness/RangeDescriptor at 0,0›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +stack:
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹goroutine 860401 [running]:›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹runtime/debug.Stack()›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/usr/local/go/src/runtime/debug/stack.go:24 +0x72›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver/spanset.(*SpanSet).checkAllowed(0xc006567ce0, 0x0, {{0x0, 0x0, 0x0}, {0xc02aa6dc0c, 0xc, 0xc}}, 0x680e660)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/spanset/spanset.go:352 +0x2ed›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver/spanset.(*SpanSet).CheckAllowed(0xc006567ec0, 0xc004c761c8, {{0x0, 0x0, 0x0}, {0xc02aa6dc0c, 0xc, 0xc}})›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/spanset/spanset.go:283 +0xd4›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver/spanset.(*MVCCIterator).checkAllowed(0xc003167ae0, {{0x0, 0x0, 0x0}, {0xc02aa6dc0c, 0xc, 0xc}}, 0x1)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/spanset/batch.go:133 +0x1a5›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver/spanset.(*MVCCIterator).SeekLT(0xc003167ae0, {{0xc02aa6dc0c, 0xc, 0xc}, {0x16e9b9865d89f592, 0x0, 0x0}})›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/spanset/batch.go:101 +0x150›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/storage.MVCCGarbageCollect({0x9a445a0, 0xc01f4c5d40}, {0x7fe0c11440b8, 0xc000fc5170}, 0xc00842f400, {0xc00dd4b720, 0x0, 0x4}, {0x16e9ba1d575a2090, 0x0, ...})›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/storage/mvcc.go:3604 +0x1049›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval.GC({_, _}, {_, _}, {{0x9b453e8, 0xc000876fc0}, {{0x16e9ba1d575a2090, 0x0, 0x0}, 0x0, ...}, ...}, ...)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval/cmd_gc.go:115 +0x39d›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.evaluateCommand({_, _}, {_, _}, {_, _}, _, {{0x16e9ba1d575a2090, 0x0, 0x0}, ...}, ...)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_evaluate.go:493 +0x2c7›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.evaluateBatch({_, _}, {_, _}, {_, _}, {_, _}, _, 0xc02c37de00, ...)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_evaluate.go:270 +0xf4f›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).evaluateWriteBatchWrapper(_, {_, _}, {_, _}, {_, _}, _, _, {{0x0, ...}, ...}, ...)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_write.go:646 +0x1a7›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).evaluateWriteBatchWithServersideRefreshes(_, {_, _}, {_, _}, {_, _}, _, _, {{0x0, ...}, ...}, ...)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_write.go:614 +0x29c›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).evaluateWriteBatch(_, {_, _}, {_, _}, _, {{0x0, 0x0, 0x0}, {0x0, ...}}, ...)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_write.go:429 +0x8dd›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).evaluateProposal(0xc0038bd400, {0x9a445a0, 0xc01f4c5d40}, {0xc007acd8d8, 0x8}, 0xc02c37de00, {{0x0, 0x0, 0x0}, {0x0, ...}}, ...)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_proposal.go:679 +0x21d›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).requestToProposal(0xc00759edd8, {0x9a445a0, _}, {_, _}, _, {{{0x16e9b713f02277b4, 0x0, 0x0}, 0xc005f12c00, ...}, ...}, ...)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_proposal.go:779 +0xfa›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).evalAndPropose(0xc0038bd400, {0x9a445a0, _}, _, _, {{{0x16e9b713f02277b4, 0x0, 0x0}, 0xc005f12c00, {0x3, ...}, ...}, ...}, ...)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_raft.go:113 +0x205›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).executeWriteBatch(0xc0038bd400, {0x9a445a0, 0xc01f4c5d40}, 0xc02c37de00, 0xc00db74d20)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_write.go:167 +0x86b›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).executeBatchWithConcurrencyRetries(0xc0038bd400, {0x9a445a0, 0xc01f4c5d40}, 0xc02c37de00, 0x680d120)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_send.go:483 +0x514›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).sendWithoutRangeID(0xc0038bd400, {0x9a445a0, 0xc01f4c5d40}, 0xc02c37de00)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_send.go:179 +0x559›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).Send(...)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_send.go:101›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*replicaGCer).send(0xc0028b35c0, {0x9a445a0, 0xc01f4c5d40}, {{{0xc00908b830, 0xb, 0x10}, {0xc00908b840, 0xb, 0x10}, 0x0}, ...})›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/mvcc_gc_queue.go:468 +0x5f6›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*replicaGCer).GC(0xc02bea8be8, {0x9a445a0, 0xc01f4c5d40}, {0xc00dd4b680, 0x0, 0x4})›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/mvcc_gc_queue.go:491 +0x150›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver/gc.processReplicatedKeyRange({0x9a445a0, 0xc01f4c5d40}, 0x0, {0x9ad4c48, 0xc023c59080}, {0x0, 0x0, 0x0}, {0x16e9b98697a90dd8, 0x0, ...}, ...)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/gc/gc.go:423 +0x1231›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver/gc.Run({_, _}, _, {_, _}, {_, _, _}, {0x16e9b98697a90dd8, 0x0, ...}, ...)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/gc/gc.go:256 +0x2cd›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*mvccGCQueue).process(0xc000e0def0, {0x9a445a0, 0xc01f4c5d40}, 0xc0038bd400, {0xc01f4c5d40, 0x0})›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/mvcc_gc_queue.go:567 +0x10c6›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*baseQueue).processReplica.func1({0x9a445a0, 0xc01f4c5d40})›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/queue.go:967 +0x283›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/util/contextutil.RunWithTimeout({0x9a445d8, 0xc0028b31d0}, {0xc0087caf00, 0x1e}, 0x8bb2c97000, 0xc005711cc8)›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/util/contextutil/context.go:91 +0xee›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*baseQueue).processReplica(0xc00bb0af20, {0x9a445d8, 0xc0028b31a0}, {0x9ad1ab8, 0xc0038bd400})›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/queue.go:926 +0x565›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*baseQueue).processLoop.func2.1({0x9a445d8, 0xc0028b31a0})›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/queue.go:845 +0x105›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2()›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:494 +0x236›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹created by github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx›
E220427 10:29:33.661166 860401 kv/kvserver/queue.go:1096 ⋮ [n3,mvccGC,s3,r2/3:‹/System/NodeLiveness{-Max}›] 2578 +‹	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:483 +0x616›

tbg added a commit to tbg/cockroach that referenced this pull request Apr 27, 2022
Fail gracefully instead of timing out the test suite.

See cockroachdb#80619 (comment)

Release note: None
@tbg
Copy link
Member Author

tbg commented Apr 27, 2022

bors r=erikgrinaker

tbg added a commit to tbg/cockroach that referenced this pull request Apr 27, 2022
See
cockroachdb#80619 (comment).

My understanding is that in `MVCCGarbageCollect`, we look at each `key`.
First, we seek the iterator to construct the `MVCCMetadata` (if there is
one), so we're here:

```
key @ ts=100   <-- iter
key @ ts=099
...
key @ ts=007
key @ ts=006
key @ ts=005
```

If we want to GC at timestamp, say, 6, we need to iterate forwards. To
avoid calling `Next()` too many times, eventually we'll instead
`SeekLT(key @ 6)`.

But we only hold the latch for `key`, so we can't seek into `[/Min,
key)`.

Disable the spanset assertions here. We use the result of `SeekLT` only
if it puts us into keyspace covered by the latch. An import cycle
(spanset - storage - spanset) made this require a small refactor.

Release note: None
@craig
Copy link
Contributor

craig bot commented Apr 27, 2022

Build succeeded:

@craig craig bot merged commit 70d1c10 into cockroachdb:master Apr 27, 2022
craig bot pushed a commit that referenced this pull request Apr 29, 2022
80629: testcluster: avoid infinite hang in WaitForNStores r=srosenberg a=tbg

Fail gracefully instead of timing out the test suite.

See #80619 (comment)

Release note: None


80781: sql/importer: skip TestRandomParquetExports r=tbg a=tbg

Refs: #80780

Reason: flaky test

Generated by bin/skip-test.

Release justification: non-production code changes

Release note: None

80783: sql: skip TestCancelMultipleQueued r=tbg a=tbg

Refs: #80782

Reason: flaky test

Generated by bin/skip-test.

Release justification: non-production code changes

Release note: None

Co-authored-by: Tobias Grieger <[email protected]>
tbg added a commit to tbg/cockroach that referenced this pull request Jun 8, 2022
See
cockroachdb#80619 (comment).

My understanding is that in `MVCCGarbageCollect`, we look at each `key`.
First, we seek the iterator to construct the `MVCCMetadata` (if there is
one), so we're here:

```
key @ ts=100   <-- iter
key @ ts=099
...
key @ ts=007
key @ ts=006
key @ ts=005
```

If we want to GC at timestamp, say, 6, we need to iterate forwards. To
avoid calling `Next()` too many times, eventually we'll instead
`SeekLT(key @ 6)`.

But we only hold the latch for `key`, so we can't seek into `[/Min,
key)`.

Disable the spanset assertions here. We use the result of `SeekLT` only
if it puts us into keyspace covered by the latch. An import cycle
(spanset - storage - spanset) made this require a small refactor.

Release note: None
craig bot pushed a commit that referenced this pull request Jun 8, 2022
80636: kvserver: avoid spanset assertion in MVCCGarbageCollect r=nvanbenschoten a=tbg

See
#80619 (comment).

My understanding is that in `MVCCGarbageCollect`, we look at each `key`.
First, we seek the iterator to construct the `MVCCMetadata` (if there is
one), so we're here:

```
key @ ts=100   <-- iter
key @ ts=099
...
key @ ts=007
key @ ts=006
key @ ts=005
```

If we want to GC at timestamp, say, 6, we need to iterate forwards. To
avoid calling `Next()` too many times, eventually we'll instead
`SeekLT(key @ 6)`.

But we only hold the latch for `key`, so we can't seek into `[/Min,
key)`.

Release note: None


Co-authored-by: Tobias Grieger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants