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: fix two silly testing bugs #76731

Merged
merged 2 commits into from
Feb 18, 2022

Conversation

tbg
Copy link
Member

@tbg tbg commented Feb 17, 2022

  • hlc: fix ManualHybridClock.Forward
  • kvserver: fix a test constant

Release note: None

The intention of `Forward` was to move the timestamp returned by
`UnixNano` forward. Instead, it was adding an absolute clock timestamp
to the delta added to each timestamp, which could overflow if only you
did it often enough (as I ended up doing).

Release note: None
This is innocuous since the method in which this is used returns a
callback that undoes the stopping of the heartbeats, and all tests
which really wanted to pass `false` call that closure immediately.

But it does matter for some tests that I am writing right now.

Release note: None
@tbg tbg requested a review from a team as a code owner February 17, 2022 12:50
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@tbg tbg requested review from erikgrinaker and a team February 17, 2022 12:50
@tbg tbg changed the title kvserver: fix to silly testing bugs kvserver: fix two silly testing bugs Feb 17, 2022
@tbg
Copy link
Member Author

tbg commented Feb 17, 2022

TFTR!

bors r=erikgrinaker

@craig
Copy link
Contributor

craig bot commented Feb 17, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Feb 17, 2022

This PR was included in a batch that was canceled, it will be automatically retried

@craig
Copy link
Contributor

craig bot commented Feb 17, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Feb 18, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Feb 18, 2022

Build failed (retrying...):

@tbg
Copy link
Member Author

tbg commented Feb 18, 2022

bors r=erikgrinaker

@craig
Copy link
Contributor

craig bot commented Feb 18, 2022

Already running a review

@craig
Copy link
Contributor

craig bot commented Feb 18, 2022

Build failed:

@tbg
Copy link
Member Author

tbg commented Feb 18, 2022

This is already tracked but good to see it happen in another test, maybe easier to repro that way. #76649

=== RUN   TestStoreRangeSplitInsideRow
    test_log_scope.go:79: test logs captured to: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestStoreRangeSplitInsideRow2440080440
    test_log_scope.go:80: use -show-logs to present logs inline
panic: unexpected Stopped processor

goroutine 650884 [running]:
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).registerWithRangefeedRaftMuLocked(0xc001e30a80, {0x9353438, 0xc008a66120}, {{0xc009feae48, 0x1, 0x8}, {0xc009feae58, 0x1, 0x8}}, {0x16d4d0ad23ed186b, ...}, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_rangefeed.go:415 +0xbdd
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).rangeFeedWithRangeID(0xc001e30a80, 0x93b39b0, 0xc00768ca20, {0x7fb170f57af8, 0xc00bb4c720})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_rangefeed.go:238 +0xafb
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).RangeFeed(...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_rangefeed.go:148
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Store).RangeFeed(0xc00589e000, 0xc00768ca20, {0x93b39b0, 0xc00bb4c720})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/store.go:3036 +0x1ec
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Stores).RangeFeed(0x0, 0xc00768ca20, {0x93b39b0, 0xc00bb4c720})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/stores.go:216 +0x185
github.com/cockroachdb/cockroach/pkg/server.(*Node).RangeFeed(0xc008470000, 0xc002691eb8, {0x93b39b0, 0xc00bb4c720})
	/go/src/github.com/cockroachdb/cockroach/pkg/server/node.go:1194 +0x79
github.com/cockroachdb/cockroach/pkg/rpc.internalClientAdapter.RangeFeed.func1()
	/go/src/github.com/cockroachdb/cockroach/pkg/rpc/context.go:702 +0x194
created by github.com/cockroachdb/cockroach/pkg/rpc.internalClientAdapter.RangeFeed
	/go/src/github.com/cockroachdb/cockroach/pkg/rpc/context.go:699 +0x28c

bors r=erikgrinaker

@craig
Copy link
Contributor

craig bot commented Feb 18, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Feb 18, 2022

Build succeeded:

@craig craig bot merged commit 822130a into cockroachdb:master Feb 18, 2022
@tbg tbg deleted the circuit-test-constant branch February 18, 2022 13:54
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.

None yet

3 participants