-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
82017: storage: add `IterOptions.RangeKeyMaskingBelow` r=jbowens a=erikgrinaker This patch adds an iterator option `RangeKeyMaskingBelow`, which will cause range keys at or below the given timestamp to mask any point keys below them. This can be used to optimize callers that do not care about deleted point keys, since Pebble will not emit these. Touches #70412. Release note: None 82088: roachtest: extract version map into separate file r=tbg a=rail Previously, we had to patch the code in order to update the version upgrade test's version mapping. This made automation a bit complicated, thus it was done manually. Additionally, when we upgraded to a new major version, we would need to patch the same test in order to generate fixtures. This patch extracts the version mapping into a separate file, which will be easier to patch using automation. Additionally, it extracts the fixture generation code into a separate test which is skipped by CI, but can be run manually. Release note: None Co-authored-by: Erik Grinaker <[email protected]> Co-authored-by: Rail Aliiev <[email protected]>
- Loading branch information
Showing
13 changed files
with
636 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// Copyright 2018 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
package tests | ||
|
||
import ( | ||
"context" | ||
"strings" | ||
"time" | ||
|
||
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/cluster" | ||
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry" | ||
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test" | ||
) | ||
|
||
func registerFixtures(r registry.Registry) { | ||
// Run this test to create a new fixture for the version upgrade test. This | ||
// is necessary after every release. For example, the day `master` becomes | ||
// the 20.2 release, this test will fail because it is missing a fixture for | ||
// 20.1; run the test (on 20.1). Check it in (instructions will be logged | ||
// below) and off we go. | ||
// | ||
// The version to create/update the fixture for. Must be released (i.e. | ||
// can download it from the homepage); if that is not the case use the | ||
// empty string which uses the local cockroach binary. Make sure that | ||
// this binary then has the correct version. For example, to make a | ||
// "v20.2" fixture, you will need a binary that has "v20.2" in the | ||
// output of `./cockroach version`, and this process will end up | ||
// creating fixtures that have "v20.2" in them. This would be part | ||
// of tagging the master branch as v21.1 in the process of going | ||
// through the major release for v20.2. The version is passed in as | ||
// FIXTURE_VERSION environment variable. | ||
// | ||
// In the common case, one should populate this with the version (instead of | ||
// using the empty string) as this is the most straightforward and least | ||
// error-prone way to generate the fixtures. | ||
// | ||
// Please note that you do *NOT* need to update the fixtures in a patch | ||
// release. This only happens as part of preparing the master branch for the | ||
// next release. The release team runbooks, at time of writing, reflect | ||
// this. | ||
// | ||
// Example invocation: | ||
// roachtest --local run generate-fixtures --debug --cockroach ./cockroach \ | ||
// --build-tag v22.1.0-beta.3 tag:fixtures | ||
runFixtures := func( | ||
ctx context.Context, | ||
t test.Test, | ||
c cluster.Cluster, | ||
) { | ||
fixtureVersion := strings.TrimPrefix(t.BuildVersion().String(), "v") | ||
makeVersionFixtureAndFatal(ctx, t, c, fixtureVersion) | ||
} | ||
spec := registry.TestSpec{ | ||
Name: "generate-fixtures", | ||
Timeout: 30 * time.Minute, | ||
Tags: []string{"fixtures"}, | ||
Owner: registry.OwnerDevInf, | ||
Cluster: r.MakeClusterSpec(4), | ||
Run: runFixtures, | ||
} | ||
r.Add(spec) | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"19.1": "2.1.9", | ||
"19.2": "19.1.11", | ||
"2.1": "2.0.7", | ||
"2.2": "2.1.9", | ||
"20.1": "19.2.11", | ||
"20.2": "20.1.16", | ||
"21.1": "20.2.12", | ||
"21.2": "21.1.12", | ||
"22.1": "21.2.7", | ||
"22.2": "22.1.1" | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.