{"record":{"id":"29d892582ada416b","repo":"weaviate/weaviate","slug":"parse-persistence-lsm-max-segment-size-w","errorCode":null,"errorMessage":"parse PERSISTENCE_LSM_MAX_SEGMENT_SIZE: %w","messagePattern":"parse PERSISTENCE_LSM_MAX_SEGMENT_SIZE: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"usecases/config/environment.go","lineNumber":516,"sourceCode":"\t// default to false (debug surface closed) only when nothing set it.\n\tif v, ok := os.LookupEnv(\"DEBUG_ENDPOINTS_ENABLED\"); ok {\n\t\tconfig.Profiling.DebugEndpointsEnabled = configRuntime.NewDynamicValue(entcfg.Enabled(v))\n\t} else if config.Profiling.DebugEndpointsEnabled == nil {\n\t\tconfig.Profiling.DebugEndpointsEnabled = configRuntime.NewDynamicValue(false)\n\t}\n\n\tif !config.Authentication.AnyAuthMethodSelected() {\n\t\tconfig.Authentication = DefaultAuthentication\n\t}\n\n\tif os.Getenv(\"PERSISTENCE_LSM_ACCESS_STRATEGY\") == \"pread\" {\n\t\tconfig.AvoidMmap = true\n\t}\n\n\tif v := os.Getenv(\"PERSISTENCE_LSM_MAX_SEGMENT_SIZE\"); v != \"\" {\n\t\tparsed, err := parseResourceString(v)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"parse PERSISTENCE_LSM_MAX_SEGMENT_SIZE: %w\", err)\n\t\t}\n\n\t\tconfig.Persistence.LSMMaxSegmentSize = parsed\n\t} else {\n\t\tconfig.Persistence.LSMMaxSegmentSize = DefaultPersistenceLSMMaxSegmentSize\n\t}\n\n\tif err := parseNonNegativeInt(\n\t\t\"PERSISTENCE_LSM_SEGMENTS_CLEANUP_INTERVAL_HOURS\",\n\t\tfunc(hours int) { config.Persistence.LSMSegmentsCleanupIntervalSeconds = hours * 3600 },\n\t\tDefaultPersistenceLSMSegmentsCleanupIntervalSeconds,\n\t); err != nil {\n\t\treturn err\n\t}\n\n\tif entcfg.Enabled(os.Getenv(\"PERSISTENCE_LSM_SEPARATE_OBJECTS_COMPACTIONS\")) {\n\t\tconfig.Persistence.LSMSeparateObjectsCompactions = true\n\t}","sourceCodeStart":498,"sourceCodeEnd":534,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/usecases/config/environment.go#L498-L534","documentation":"Startup configuration error: PERSISTENCE_LSM_MAX_SEGMENT_SIZE is set but cannot be parsed as a resource size string (e.g. '64MiB', '1GiB'). Malformed values like '64MBx' or bare nonsense abort FromEnv, preventing the LSM segment-size tuning from taking an unintended value.","triggerScenarios":"Thrown at usecases/config/environment.go:516 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the variable to a valid resource string such as '64MiB' or '1GiB'","Unset the variable to fall back to the default segment size"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}