{"record":{"id":"d2a25b1bb1821e58","repo":"vitessio/vitess","slug":"both-the-dry-run-mode-and-actual-buffering-is-enab","errorCode":null,"errorMessage":"both the dry-run mode and actual buffering is enabled. To avoid ambiguity, keyspaces and shards for actual buffering must be explicitly listed in --buffer-keyspace-shards","messagePattern":"both the dry-run mode and actual buffering is enabled\\. To avoid ambiguity, keyspaces and shards for actual buffering must be explicitly listed in --buffer-keyspace-shards","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vtgate/buffer/flags.go","lineNumber":87,"sourceCode":"\tif bufferWindow > bufferMaxFailoverDuration {\n\t\treturn fmt.Errorf(\"--buffer-window must be <= --buffer-max-failover-duration: %v vs. %v\", bufferWindow, bufferMaxFailoverDuration)\n\t}\n\tif bufferSize < 1 {\n\t\treturn fmt.Errorf(\"--buffer-size must be >= 1 (specified value: %d)\", bufferSize)\n\t}\n\tif bufferMinTimeBetweenFailovers < 1*time.Second {\n\t\treturn fmt.Errorf(\"--buffer-min-time-between-failovers must be >= 1s (specified value: %v)\", bufferMinTimeBetweenFailovers)\n\t}\n\n\tif bufferDrainConcurrency < 1 {\n\t\treturn fmt.Errorf(\"--buffer-drain-concurrency must be >= 1 (specified value: %d)\", bufferDrainConcurrency)\n\t}\n\n\tif bufferKeyspaceShards != \"\" && !bufferEnabled {\n\t\treturn fmt.Errorf(\"--buffer-keyspace-shards=%v also requires that --enable_buffer is set\", bufferKeyspaceShards)\n\t}\n\tif bufferEnabled && bufferEnabledDryRun && bufferKeyspaceShards == \"\" {\n\t\treturn errors.New(\"both the dry-run mode and actual buffering is enabled. To avoid ambiguity, keyspaces and shards for actual buffering must be explicitly listed in --buffer-keyspace-shards\")\n\t}\n\n\tkeyspaces, shards := keyspaceShardsToSets(bufferKeyspaceShards)\n\tfor s := range shards {\n\t\tkeyspace, _, err := topoproto.ParseKeyspaceShard(s)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif keyspaces[keyspace] {\n\t\t\treturn fmt.Errorf(\"--buffer-keyspace-shards has overlapping entries (keyspace only vs. keyspace/shard): %v vs. %v Please remove one or the other\", keyspace, s)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// keyspaceShardsToSets converts a comma separated list of keyspace[/shard]\n// entries to two sets: keyspaces (if the shard is not specified) and shards (if","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vtgate/buffer/flags.go#L69-L105","documentation":"verifyFlags validates the vtgate buffering flags. When both --enable_buffer (actual buffering) and dry-run mode are enabled, actual buffering is only allowed for keyspaces/shards explicitly listed in --buffer-keyspace-shards; leaving that flag empty would ambiguously enable real buffering everywhere, so startup fails.","triggerScenarios":"Starting vtgate with --enable_buffer=true, --enable_buffer_dry_run=true (or equivalent config), and an empty --buffer-keyspace-shards.","commonSituations":"Operator turns on real buffering after dry-run testing but forgets to list the target keyspace/shard pairs; copied config from a dry-run example.","solutions":["List the keyspace/shard pairs in --buffer-keyspace-shards, e.g. 'ks1/-40, ks1/40-80'","Disable dry-run if you intended only dry-run behavior, or disable --enable_buffer if you only wanted dry-run","Check other buffering flag validations in the same function (e.g. buffer-keyspace-shards requires --enable_buffer)"],"exampleFix":"// before\nvtgate --enable_buffer --enable_buffer_dry_run\n// after\nvtgate --enable_buffer --buffer-keyspace-shards 'commerce/-80,commerce/80-'","handlingStrategy":"validation","validationCode":"if bufferEnabled && bufferEnabledDryRun && bufferKeyspaceShards == \"\" {\n    return errors.New(\"dry-run + real buffering requires --buffer-keyspace-shards\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run verifyFlags logic (or vtgate --help) before deploying buffering config changes","Promote dry-run to real buffering by explicitly enumerating keyspace/shards","Keep buffering flags in one reviewed config block to avoid partial edits"],"tags":["vtgate","buffering","flags","startup"],"backgroundTag":"conflicting-flags","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}