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

batcheval: add setting to reject non-MVCC AddSSTable #76934

Merged
merged 1 commit into from
Mar 22, 2022

Conversation

erikgrinaker
Copy link
Contributor

@erikgrinaker erikgrinaker commented Feb 23, 2022

This patch adds a cluster setting
kv.bulk_io_write.sst_require_at_request_timestamp.enabled (default
false), which will reject all non-MVCC AddSSTable requests (i.e.
without SSTTimestampToRequestTimestamp set).

This can be used to verify that all callers send MVCC-compliant
AddSSTable requests, for example when testing streaming replication or
in preparation for 22.2. It is not enabled by default, since that would
require multiple migrations to ensure all callers were in fact using
SSTTimestampToRequestTimestamp (which is new in this release), and
would prevent falling back to the old index backfiller in case bugs are
discovered.

Release note: None

@erikgrinaker erikgrinaker requested a review from a team as a code owner February 23, 2022 16:40
@erikgrinaker erikgrinaker self-assigned this Feb 23, 2022
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@erikgrinaker
Copy link
Contributor Author

I'm expecting this to break all sorts of tests, but I'll let CI find out which.

@dt
Copy link
Member

dt commented Feb 23, 2022

I think CTAS and materialized views are for sure going to beak since I didn’t change their flag to bulk adder yet. I wonder if we should just change the default in bulk adder options.

@erikgrinaker erikgrinaker force-pushed the addsstable-reject-nonmvcc branch from 43d1fce to c1e0850 Compare February 24, 2022 14:01
@erikgrinaker
Copy link
Contributor Author

I think CTAS and materialized views are for sure going to beak since I didn’t change their flag to bulk adder yet. I wonder if we should just change the default in bulk adder options.

I'm starting to wonder if this whole thing is even a good idea. Callers can't use the new SSTTimestampToRequestTimestamp before the MVCCAddSSTable cluster version is set, so until then they're going to send old AddSSTable requests. But once the cluster version AddSSTableRequireAtRequestTimestamp activates, nodes are going to reject old-style requests. Since cluster versions are applied asynchronously, it's very possible for one node to transition through all of these cluster versions before another node goes through any of them, and have its requests rejected in the meanwhile.

@erikgrinaker erikgrinaker force-pushed the addsstable-reject-nonmvcc branch from c1e0850 to 6f69250 Compare February 24, 2022 14:22
@erikgrinaker erikgrinaker requested a review from a team February 24, 2022 14:22
@erikgrinaker erikgrinaker force-pushed the addsstable-reject-nonmvcc branch from 6f69250 to 5b1db19 Compare March 10, 2022 11:56
@erikgrinaker erikgrinaker changed the title batcheval: reject AddSSTable without SSTTimestampToRequestTimestamp batcheval: add setting to reject non-MVCC AddSSTable Mar 10, 2022
@erikgrinaker
Copy link
Contributor Author

I've updated this to be a default-off setting as we discussed, PTAL.

This patch adds a cluster setting
`kv.bulk_io_write.sst_require_at_request_timestamp.enabled` (default
`false`), which will reject all non-MVCC `AddSSTable` requests (i.e.
without `SSTTimestampToRequestTimestamp` set).

This can be used to verify that all callers send MVCC-compliant
`AddSSTable` requests, for example when testing streaming replication or
in preparation for 22.2. It is not enabled by default, since that would
require multiple migrations to ensure all callers were in fact using
`SSTTimestampToRequestTimestamp` (which is new in this release), and
would prevent falling back to the old index backfiller in case bugs are
discovered.

Release note: None
@erikgrinaker erikgrinaker force-pushed the addsstable-reject-nonmvcc branch from 5b1db19 to 3c557ca Compare March 21, 2022 11:57
@erikgrinaker
Copy link
Contributor Author

bors r=dt

@erikgrinaker
Copy link
Contributor Author

bors r=dt

@craig
Copy link
Contributor

craig bot commented Mar 21, 2022

Build failed (retrying...):

craig bot pushed a commit that referenced this pull request Mar 21, 2022
76934: batcheval: add setting to reject non-MVCC `AddSSTable` r=dt a=erikgrinaker

This patch adds a cluster setting
`kv.bulk_io_write.sst_require_at_request_timestamp.enabled` (default
`false`), which will reject all non-MVCC `AddSSTable` requests (i.e.
without `SSTTimestampToRequestTimestamp` set).

This can be used to verify that all callers send MVCC-compliant
`AddSSTable` requests, for example when testing streaming replication or
in preparation for 22.2. It is not enabled by default, since that would
require multiple migrations to ensure all callers were in fact using
`SSTTimestampToRequestTimestamp` (which is new in this release), and
would prevent falling back to the old index backfiller in case bugs are
discovered.

Release note: None

77965: ccl/sqlproxyccl: rename RequestTransfer to TransferConnection, and make it sync r=JeffSwenson a=jaylim-crl

Fixes a test flake in #77909.

This commit fixes a test flake as described in the issue above. At the same
time, we rename RequestTransfer to TransferConnection, and make the API
synchronous instead. The transferer should invoke TransferConnection within
a goroutine.

Release justification: sqlproxy only change. Transfer API isn't used anywhere
besides tests as well.

Release note: None

78094: ui/tracez: load new snapshots automatically r=andreimatei a=andreimatei

Before this patch taking a new snapshot had no apparent visual feedback.
This patch makes it so that the new snapshot is loaded automatically.

Release note: None

78196: ci: upgrade to Ubuntu 20.04 for TC agents r=rail a=rickystewart

Release note: None

78198: release: use REL Jira project to track releases r=rail a=rail

Previously, we used RE Jira project to track releases.

The REL project was intended to be used from the beginning, but it was
missing some configuration tweaks.

This patch changes the Jira project and removes the in-line release
checklist in favour of Jira checklist.

Release note: None

78201: Revert "kvstreamer: re-enable streamer by default" r=yuzefovich a=yuzefovich

This reverts commit b72c109.

Informs: #78145.

Co-authored-by: Erik Grinaker <[email protected]>
Co-authored-by: Jay <[email protected]>
Co-authored-by: Andrei Matei <[email protected]>
Co-authored-by: Ricky Stewart <[email protected]>
Co-authored-by: Rail Aliiev <[email protected]>
Co-authored-by: Yahor Yuzefovich <[email protected]>
@craig
Copy link
Contributor

craig bot commented Mar 21, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 22, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 22, 2022

Build succeeded:

@craig craig bot merged commit 10e0c5d into cockroachdb:master Mar 22, 2022
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