kvserver: fix up multiTestContext clocks#45984
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Mar 17, 2020
Merged
Conversation
multiTestContext is a piece of garbage. The particular shortcoming I'm fixing here is that it was easy to accidentally mix manual and automatic clocks. This would happen whenever passing a `storeConfig` in, which by default comes with a real-time clock (whereas the mtc also has m.clock, which is by default manual). Components using the store config would use real time, but other components fake time. You can imagine how this is not going to work well. In the particular example motivating this PR, GC ran and set a real-time GC threshold, so that heartbeats (which were using fake time) could never go through as their manual timestamp didn't change in the wall time compoment thanks to their underlying manual clock. Now mtc will blow up more eagerly if you try to mix clocks like that - you have to go all manual or all automatic (and nobody should choose to go manual btw, this doesn't work very well). Fixes cockroachdb#45814. Release justification: test fix in non-production code. Release note: None
Member
Member
Author
|
Friendly ping. |
nvb
approved these changes
Mar 16, 2020
Contributor
nvb
left a comment
There was a problem hiding this comment.
Reviewed 10 of 10 files at r1.
Reviewable status:complete! 1 of 0 LGTMs obtained
Member
Author
|
TFTR! |
Contributor
Canceled (will resume) |
Member
Author
|
bors pls bors r=nvanbenschoten |
Member
Author
|
bors r=nvanbenschoten Come on bors |
Contributor
Build succeeded |
OwenQian
pushed a commit
to OwenQian/cockroach
that referenced
this pull request
Mar 21, 2020
…t of \cockroachdb#45984, which changed the behavior of multiTestContext to use a real-time clock if it wasn't explicitly set to a manual clock. Release justification: Deflake test in non-production code. Release note: None.
craig bot
pushed a commit
that referenced
this pull request
Mar 21, 2020
46373: deflake TestStoreRangeMergeRaftSnapshot by using a manual clock r=tbg a=OwenQian This test became flaky after #45984, which changed the behavior of multiTestContext to use a real-time clock if it wasn't explicitly set to a manual clock. Fixes #46192. Release justification: Deflake test in non-production code. Release note: None. Co-authored-by: Owen Qian <owenq@cockroachlabs.com>
nvb
added a commit
to nvb/cockroach
that referenced
this pull request
Mar 23, 2020
Fixes cockroachdb#46215. Fallout from cockroachdb#45984. Release justification: testing only Release note: None.
craig bot
pushed a commit
that referenced
this pull request
Mar 23, 2020
46408: opt: fix buggy EliminateUpsertDistinctOnNoColumns rule r=andy-kimball a=andy-kimball The fix for #37880 added a new ErrorOnDup field to the UpsertDistinctOn operator. However, the EliminateErrorDistinctNoColumns rule wasn't changed to respect this flag, and so there's still a case where ON CONFLICT DO NOTHING returns an error. This commit eliminates the error by separating out the ErrorOnDup=True case from the EliminateErrorDistinctNoColumns rule (which raises an error) and adding it instead to the EliminateDistinctNoColumns rule (which does not raise an error). Fixes #46395 Release justification: Bug fixes and low-risk updates to new functionality. This was always an error, so it's low-risk to make it a non-error. Release note: None 46431: kv: don't disable the merge queue needlessly in more tests r=nvanbenschoten a=nvanbenschoten Follow up to #46383. These tests were disabling the queue to not interfere with its AdminSplits, but since the tests were written, AdminSplit got a TTL. Release note: None Release justification: test only 46433: kv: re-enable merge queue in TestSplitTriggerRaftSnapshotRace r=nvanbenschoten a=nvanbenschoten The merge queue was disabled in this test by df26cf6 due to the bug found in #32784. That bug was fixed by #33312, so we can address the TODO and re-enable merges in the test. Release note: None Release justification: test only 46444: kv: deflake TestRangeInfo by using a manual clock r=nvanbenschoten a=nvanbenschoten Fixes #46215. Fallout from #45984. Release justification: testing only Release note: None. Co-authored-by: Andrew Kimball <andyk@cockroachlabs.com> Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
multiTestContext is a piece of garbage. The particular shortcoming I'm
fixing here is that it was easy to accidentally mix manual and automatic
clocks. This would happen whenever passing a
storeConfigin, whichby default comes with a real-time clock (whereas the mtc also has
m.clock, which is by default manual). Components using the store
config would use real time, but other components fake time.
You can imagine how this is not going to work well. In the particular
example motivating this PR, GC ran and set a real-time GC threshold,
so that heartbeats (which were using fake time) could never go through
as their manual timestamp didn't change in the wall time compoment
thanks to their underlying manual clock.
Now mtc will blow up more eagerly if you try to mix clocks like that -
you have to go all manual or all automatic (and nobody should choose
to go manual btw, this doesn't work very well).
Fixes #45814.
Release justification: test fix in non-production code.
Release note: None