Skip to content

Commit 86ad1ee

Browse files
feat(mutations): flip default mutations-pipeline-threshold from 0 to 1
Engages the per-predicate mutation pipeline by default so that systest runs (and any other test suites that don't override feature-flags) exercise the pipeline path on every mutation, not the legacy serial path. Threshold of 1 means "any mutation with ≥1 edge takes the pipeline" — i.e. always on. This is a deliberate ramp toward shipping the pipeline. Operators who want to opt small interactive mutations out of the pipeline (where benches showed ~2x slowdown for ≤10-edge txns) can set a higher threshold: dgraph alpha --feature-flags="mutations-pipeline-threshold=200" To turn the pipeline fully off, set 0. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent c8f5fbc commit 86ad1ee

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

worker/server_state.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const (
4343
`lambda-url=;`
4444
CacheDefaults = `size-mb=4096; percentage=40,40,20; remove-on-update=false`
4545
FeatureFlagsDefaults = `normalize-compatibility-mode=; enable-detailed-metrics=false; ` +
46-
`log-slow-query-threshold=0; mutations-pipeline-threshold=0`
46+
`log-slow-query-threshold=0; mutations-pipeline-threshold=1`
4747
)
4848

4949
// ServerState holds the state of the Dgraph server.

x/config.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,13 @@ type WorkerOptions struct {
141141
// MutationsPipelineThreshold gates the per-predicate mutation pipeline
142142
// in applyMutations. A mutation runs through the pipeline only when
143143
// MutationsPipelineThreshold > 0 and len(m.Edges) >= the threshold;
144-
// otherwise it falls back to the legacy serial path. Set to 0 (default)
145-
// to disable the pipeline entirely. Set to 1 to always use the pipeline.
146-
// The pipeline pays goroutine spin-up cost per predicate, so small
144+
// otherwise it falls back to the legacy serial path. Set to 0 to
145+
// disable the pipeline entirely. Set to 1 (default) to always use it.
146+
// The pipeline pays goroutine spin-up cost per predicate, so tiny
147147
// mutations are slower on it; bulk multi-predicate mutations are
148-
// faster — pick a value above the per-mutation edge count where the
149-
// crossover happens for your workload (~100 in benchmarks here).
148+
// faster — set to a value above the per-mutation edge count where the
149+
// crossover happens for your workload (~100 in benchmarks here) if
150+
// you want only large mutations to take the pipeline path.
150151
// Plumbed via the "feature-flags" superflag as
151152
// "mutations-pipeline-threshold".
152153
MutationsPipelineThreshold int

0 commit comments

Comments
 (0)