{"record":{"id":"bdb27d832878c4ce","repo":"nats-io/nats-server","slug":"field-q-old-v-new-v","errorCode":null,"errorMessage":"field %q: old=%v, new=%v","messagePattern":"field %q: old=(.+?), new=(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/reload.go","lineNumber":2877,"sourceCode":"\t\tif field.PkgPath != _EMPTY_ {\n\t\t\tcontinue\n\t\t}\n\t\t// If it is in the set of fields to ignore, move to the next.\n\t\t// We expect the number of ignore fields to be small.\n\t\tvar ignored bool\n\t\tfor _, f := range ignoreFields {\n\t\t\tif f == field.Name {\n\t\t\t\tignored = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif ignored {\n\t\t\tcontinue\n\t\t}\n\t\toldValue := oldConfig.Field(i).Interface()\n\t\tnewValue := newConfig.Field(i).Interface()\n\t\tif !reflect.DeepEqual(oldValue, newValue) {\n\t\t\treturn fmt.Errorf(\"field %q: old=%v, new=%v\", field.Name, oldValue, newValue)\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":2859,"sourceCodeEnd":2882,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/reload.go#L2859-L2882","documentation":"Generic reflect-based field differ (used for options structs that must be immutable across reloads): it walks exported, non-ignored fields with reflect.DeepEqual and reports the first field whose old and new values differ, including field name and both values. The specific field at fault is named in the error; the field is one that has no dedicated reload handler.","triggerScenarios":"Thrown at server/reload.go:2877 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Identify the named field in the error, revert it to its current runtime value, and reload again","If the change is required, restart the server instead of reloading","Consult documentation for which options of that struct support dynamic reload"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3a66a489d262bf89b71a71c955c94920394532f3","analyzedAt":"2026-09-02T04:41:54.247Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}