Created
November 8, 2023 18:32
-
-
Save jbowens/af624623867ca4dd8c27be2064eafcfd to your computer and use it in GitHub Desktop.
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
diff --git a/pkg/kv/kvnemesis/generator.go b/pkg/kv/kvnemesis/generator.go | |
index 6287d89f249..41a35c9fd60 100644 | |
--- a/pkg/kv/kvnemesis/generator.go | |
+++ b/pkg/kv/kvnemesis/generator.go | |
@@ -327,52 +327,28 @@ type ChangeZoneConfig struct { | |
// yet pass (for example, if the new operation finds a kv bug or edge case). | |
func newAllOperationsConfig() GeneratorConfig { | |
clientOpConfig := ClientOperationConfig{ | |
- GetMissing: 1, | |
- GetMissingForUpdate: 1, | |
- GetMissingForUpdateGuaranteedDurability: 1, | |
- GetMissingForUpdateSkipLocked: 1, | |
- GetMissingForUpdateSkipLockedGuaranteedDurability: 1, | |
- GetMissingForShare: 1, | |
- GetMissingForShareGuaranteedDurability: 1, | |
- GetMissingForShareSkipLocked: 1, | |
- GetMissingForShareSkipLockedGuaranteedDurability: 1, | |
- GetExisting: 1, | |
- GetExistingForUpdate: 1, | |
- GetExistingForUpdateGuaranteedDurability: 1, | |
- GetExistingForShare: 1, | |
- GetExistingForShareGuaranteedDurability: 1, | |
- GetExistingSkipLocked: 1, | |
- GetExistingForUpdateSkipLocked: 1, | |
- GetExistingForUpdateSkipLockedGuaranteedDurability: 1, | |
- GetExistingForShareSkipLocked: 1, | |
- GetExistingForShareSkipLockedGuaranteedDurability: 1, | |
- PutMissing: 1, | |
- PutExisting: 1, | |
- Scan: 1, | |
- ScanForUpdate: 1, | |
- ScanForUpdateGuaranteedDurability: 1, | |
- ScanForShare: 1, | |
- ScanForShareGuaranteedDurability: 1, | |
- ScanSkipLocked: 1, | |
- ScanForUpdateSkipLocked: 1, | |
- ScanForUpdateSkipLockedGuaranteedDurability: 1, | |
- ScanForShareSkipLocked: 1, | |
- ScanForShareSkipLockedGuaranteedDurability: 1, | |
- ReverseScan: 1, | |
- ReverseScanForUpdate: 1, | |
- ReverseScanForUpdateGuaranteedDurability: 1, | |
- ReverseScanForShare: 1, | |
- ReverseScanForShareGuaranteedDurability: 1, | |
- ReverseScanSkipLocked: 1, | |
- ReverseScanForUpdateSkipLocked: 1, | |
- ReverseScanForUpdateSkipLockedGuaranteedDurability: 1, | |
- ReverseScanForShareSkipLocked: 1, | |
- ReverseScanForShareSkipLockedGuaranteedDurability: 1, | |
- DeleteMissing: 1, | |
- DeleteExisting: 1, | |
- DeleteRange: 1, | |
- DeleteRangeUsingTombstone: 1, | |
- AddSSTable: 1, | |
+ GetMissing: 1, | |
+ GetMissingForUpdate: 1, | |
+ GetMissingForUpdateSkipLocked: 1, | |
+ GetExisting: 1, | |
+ GetExistingForUpdate: 1, | |
+ GetExistingSkipLocked: 1, | |
+ GetExistingForUpdateSkipLocked: 1, | |
+ PutMissing: 1, | |
+ PutExisting: 1, | |
+ Scan: 1, | |
+ ScanForUpdate: 1, | |
+ ScanSkipLocked: 1, | |
+ ScanForUpdateSkipLocked: 1, | |
+ ReverseScan: 1, | |
+ ReverseScanForUpdate: 1, | |
+ ReverseScanSkipLocked: 1, | |
+ ReverseScanForUpdateSkipLocked: 1, | |
+ DeleteMissing: 1, | |
+ DeleteExisting: 1, | |
+ DeleteRange: 1, | |
+ DeleteRangeUsingTombstone: 1, | |
+ AddSSTable: 1, | |
} | |
batchOpConfig := BatchOperationConfig{ | |
Batch: 4, | |
@@ -382,18 +358,12 @@ func newAllOperationsConfig() GeneratorConfig { | |
DB: clientOpConfig, | |
Batch: batchOpConfig, | |
ClosureTxn: ClosureTxnConfig{ | |
- CommitSerializable: 2, | |
- CommitSnapshot: 2, | |
- CommitReadCommitted: 2, | |
- RollbackSerializable: 2, | |
- RollbackSnapshot: 2, | |
- RollbackReadCommitted: 2, | |
- CommitSerializableInBatch: 2, | |
- CommitSnapshotInBatch: 2, | |
- CommitReadCommittedInBatch: 2, | |
- TxnClientOps: clientOpConfig, | |
- TxnBatchOps: batchOpConfig, | |
- CommitBatchOps: clientOpConfig, | |
+ CommitSerializable: 2, | |
+ RollbackSerializable: 2, | |
+ CommitSerializableInBatch: 2, | |
+ TxnClientOps: clientOpConfig, | |
+ TxnBatchOps: batchOpConfig, | |
+ CommitBatchOps: clientOpConfig, | |
}, | |
Split: SplitConfig{ | |
SplitNew: 1, | |
diff --git a/pkg/kv/kvnemesis/kvnemesis_test.go b/pkg/kv/kvnemesis/kvnemesis_test.go | |
index ca1b571fecf..c75b7319a6f 100644 | |
--- a/pkg/kv/kvnemesis/kvnemesis_test.go | |
+++ b/pkg/kv/kvnemesis/kvnemesis_test.go | |
@@ -39,7 +39,7 @@ import ( | |
"github.com/stretchr/testify/require" | |
) | |
-var defaultNumSteps = envutil.EnvOrDefaultInt("COCKROACH_KVNEMESIS_STEPS", 50) | |
+var defaultNumSteps = envutil.EnvOrDefaultInt("COCKROACH_KVNEMESIS_STEPS", 1000) | |
func (cfg kvnemesisTestCfg) testClusterArgs(tr *SeqTracker) base.TestClusterArgs { | |
storeKnobs := &kvserver.StoreTestingKnobs{ | |
@@ -259,10 +259,11 @@ func TestKVNemesisMultiNode(t *testing.T) { | |
defer log.Scope(t).Close(t) | |
testKVNemesisImpl(t, kvnemesisTestCfg{ | |
- numNodes: 4, | |
- numSteps: defaultNumSteps, | |
- concurrency: 5, | |
- seedOverride: 0, | |
+ numNodes: 4, | |
+ numSteps: defaultNumSteps, | |
+ concurrency: 5, | |
+ seedOverride: 1581016586226339512, | |
+ //seedOverride: 1438086008005333832, | |
invalidLeaseAppliedIndexProb: 0.1, | |
injectReproposalErrorProb: 0.1, | |
}) | |
diff --git a/pkg/kv/kvserver/replica_raftstorage.go b/pkg/kv/kvserver/replica_raftstorage.go | |
index 0aac16f31df..d9b962c1dec 100644 | |
--- a/pkg/kv/kvserver/replica_raftstorage.go | |
+++ b/pkg/kv/kvserver/replica_raftstorage.go | |
@@ -45,14 +45,7 @@ var snapshotIngestAsWriteThreshold = settings.RegisterByteSizeSetting( | |
settings.SystemOnly, | |
"kv.snapshot.ingest_as_write_threshold", | |
"size below which a range snapshot ingestion will be performed as a normal write", | |
- func() int64 { | |
- return int64(util.ConstantWithMetamorphicTestChoice( | |
- "kv.snapshot.ingest_as_write_threshold", | |
- 100<<10, /* default value is 100KiB */ | |
- 1<<30, /* 1GiB causes everything to be a normal write */ | |
- 0, /* 0B causes everything to be an ingest */ | |
- ).(int)) | |
- }()) | |
+ 0) | |
// replicaRaftStorage implements the raft.Storage interface. | |
type replicaRaftStorage Replica | |
diff --git a/pkg/sql/row/kv_batch_fetcher.go b/pkg/sql/row/kv_batch_fetcher.go | |
index d2e7c5c1c44..b6de81ec765 100644 | |
--- a/pkg/sql/row/kv_batch_fetcher.go | |
+++ b/pkg/sql/row/kv_batch_fetcher.go | |
@@ -52,11 +52,7 @@ func getKVBatchSize(forceProductionKVBatchSize bool) rowinfra.KeyLimit { | |
return defaultKVBatchSize | |
} | |
-var defaultKVBatchSize = rowinfra.KeyLimit(util.ConstantWithMetamorphicTestValue( | |
- "kv-batch-size", | |
- int(rowinfra.ProductionKVBatchSize), /* defaultValue */ | |
- 1, /* metamorphicValue */ | |
-)) | |
+var defaultKVBatchSize = rowinfra.KeyLimit(1) | |
var logAdmissionPacerErr = log.Every(100 * time.Millisecond) | |
diff --git a/pkg/storage/lock_table_iterator.go b/pkg/storage/lock_table_iterator.go | |
index 1d528f34cfb..b7c9ab738be 100644 | |
--- a/pkg/storage/lock_table_iterator.go | |
+++ b/pkg/storage/lock_table_iterator.go | |
@@ -18,7 +18,6 @@ import ( | |
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/concurrency/lock" | |
"github.com/cockroachdb/cockroach/pkg/roachpb" | |
"github.com/cockroachdb/cockroach/pkg/storage/enginepb" | |
- "github.com/cockroachdb/cockroach/pkg/util" | |
"github.com/cockroachdb/cockroach/pkg/util/protoutil" | |
"github.com/cockroachdb/cockroach/pkg/util/uuid" | |
"github.com/cockroachdb/errors" | |
@@ -510,12 +509,7 @@ const defaultLockTableItersBeforeSeek = 5 | |
// shared locks on a single user key before seeking past them. This is used to | |
// avoid iterating over all shared locks on a key when not necessary, given the | |
// filtering criteria. | |
-var lockTableItersBeforeSeek = util.ConstantWithMetamorphicTestRange( | |
- "lock-table-iters-before-seek", | |
- defaultLockTableItersBeforeSeek, /* defaultValue */ | |
- 0, /* min */ | |
- 3, /* max */ | |
-) | |
+var lockTableItersBeforeSeek = 1 | |
// DisableMetamorphicLockTableItersBeforeSeek disables the metamorphic value for | |
// the duration of a test, resetting it at the end. | |
diff --git a/pkg/storage/pebble.go b/pkg/storage/pebble.go | |
index 6d14cc2faeb..a268f69beb9 100644 | |
--- a/pkg/storage/pebble.go | |
+++ b/pkg/storage/pebble.go | |
@@ -95,8 +95,7 @@ var ValueBlocksEnabled = settings.RegisterBoolSetting( | |
settings.ApplicationLevel, // used for temp storage in virtual cluster servers | |
"storage.value_blocks.enabled", | |
"set to true to enable writing of value blocks in sstables", | |
- util.ConstantWithMetamorphicTestBool( | |
- "storage.value_blocks.enabled", true), | |
+ true, | |
settings.WithPublic) | |
// UseEFOS controls whether uses of pebble Snapshots should use | |
@@ -109,8 +108,7 @@ var UseEFOS = settings.RegisterBoolSetting( | |
settings.SystemOnly, | |
"storage.experimental.eventually_file_only_snapshots.enabled", | |
"set to true to use eventually-file-only-snapshots even when kv.snapshot_receiver.excise.enabled is false", | |
- util.ConstantWithMetamorphicTestBool( | |
- "storage.experimental.eventually_file_only_snapshots.enabled", false), /* defaultValue */ | |
+ false, | |
settings.WithPublic) | |
// UseExciseForSnapshots controls whether virtual-sstable-based excises should | |
@@ -123,8 +121,7 @@ var UseExciseForSnapshots = settings.RegisterBoolSetting( | |
settings.SystemOnly, | |
"kv.snapshot_receiver.excise.enabled", | |
"set to true to use excises instead of range deletions for KV snapshots", | |
- util.ConstantWithMetamorphicTestBool( | |
- "kv.snapshot_receiver.excise.enabled", false), /* defaultValue */ | |
+ false, | |
settings.WithPublic, | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment