{"record":{"id":"b26bdf61c80a51be","repo":"juicedata/juicefs","slug":"cannot-lower-min-client-version-from-s-to-s","errorCode":null,"errorMessage":"cannot lower min-client-version from %s to %s","messagePattern":"cannot lower min-client-version from (.+?) to (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/config.go","lineNumber":350,"sourceCode":"\t\t\tif new := ctx.Int64(flag); new != format.ChangeLogMaxLines {\n\t\t\t\tif new < 0 {\n\t\t\t\t\treturn fmt.Errorf(\"negative value for %s: %d\", flag, new)\n\t\t\t\t}\n\t\t\t\tmsg.WriteString(fmt.Sprintf(\"%10s: %d -> %d\\n\", flag, format.ChangeLogMaxLines, new))\n\t\t\t\tformat.ChangeLogMaxLines = new\n\t\t\t}\n\t\tcase \"user-group-quota\":\n\t\t\tif new := ctx.Bool(flag); new != format.UserGroupQuota {\n\t\t\t\tmsg.WriteString(fmt.Sprintf(\"%10s: %t -> %t\\n\", flag, format.UserGroupQuota, new))\n\t\t\t\tformat.UserGroupQuota = new\n\t\t\t}\n\t\tcase \"min-client-version\":\n\t\t\tif new := ctx.String(flag); new != format.MinClientVersion {\n\t\t\t\tif version.Parse(new) == nil {\n\t\t\t\t\treturn fmt.Errorf(\"Invalid version string: %s\", new)\n\t\t\t\t}\n\t\t\t\tif compareVersion(new, format.MinClientVersion) < 0 {\n\t\t\t\t\treturn fmt.Errorf(\"cannot lower min-client-version from %s to %s\", format.MinClientVersion, new)\n\t\t\t\t}\n\t\t\t\trequireMinClientVersion(new)\n\t\t\t}\n\t\tcase \"max-client-version\":\n\t\t\tif new := ctx.String(flag); new != format.MaxClientVersion {\n\t\t\t\tif version.Parse(new) == nil {\n\t\t\t\t\treturn fmt.Errorf(\"Invalid version string: %s\", new)\n\t\t\t\t}\n\t\t\t\tmsg.WriteString(fmt.Sprintf(\"%s: %s -> %s\\n\", flag, format.MaxClientVersion, new))\n\t\t\t\tformat.MaxClientVersion = new\n\t\t\t\tclientVer = true\n\t\t\t}\n\t\tcase \"enable-acl\":\n\t\t\tif enableACL := ctx.Bool(flag); enableACL != format.EnableACL {\n\t\t\t\tif enableACL {\n\t\t\t\t\tmsg.WriteString(fmt.Sprintf(\"%s: %v -> %v\\n\", flag, format.EnableACL, true))\n\t\t\t\t\tformat.EnableACL = true\n\t\t\t\t\trequireMinClientVersion(\"1.2.0-A\")","sourceCodeStart":332,"sourceCodeEnd":368,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/cmd/config.go#L332-L368","documentation":"`juicefs config` refuses to lower `min-client-version`: the new value must be greater than or equal to the current one, enforced with compareVersion. Lowering could let incompatible old clients reconnect to a volume that depends on newer metadata semantics.","triggerScenarios":"`juicefs config META --min-client-version <lower-version>` where the requested version compares less than format.MinClientVersion.","commonSituations":"Rolling back an upgrade policy after setting a too-high minimum; thinking the flag sets a fixed version rather than a floor; copying a command from an older run.","solutions":["Choose a value >= the current min-client-version (check via `juicefs config META`)","If lowering is truly needed, review AGENTS-doc compatibility rules and the reason the floor exists before bypassing (no supported bypass via this flag)","Leave the flag unset if no change is intended"],"exampleFix":"// before\njuicefs config META --min-client-version 1.0.0   # current 1.2.0 -> error\n// after\njuicefs config META --min-client-version 1.3.0","handlingStrategy":"validation","validationCode":"cur=$(juicefs config META | grep min-client-version)\nvercmp \"$NEW\" -ge \"$cur\" || die \"cannot lower min-client-version\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Read current min-client-version before changing it","Never lower the floor without a compatibility review","Document intended version floors in ops runbooks"],"tags":["cli","version","compatibility"],"backgroundTag":"invalid-state-transition","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}