{"record":{"id":"f0678acc3a27b990","repo":"sgl-project/sglang","slug":"extra-config-ssd-durability-mode-must-be-one-of","errorCode":null,"errorMessage":"extra_config['ssd_durability_mode'] must be one of: strict, sync, relaxed, async","messagePattern":"extra_config\\['ssd_durability_mode'\\] must be one of: strict, sync, relaxed, async","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/mem_cache/storage/umbp/umbp_store.py","lineNumber":351,"sourceCode":"        if \"eviction_policy\" in extra:\n            cfg.eviction.policy = str(extra[\"eviction_policy\"])\n        if \"eviction_candidate_window\" in extra:\n            cfg.eviction.candidate_window = int(extra[\"eviction_candidate_window\"])\n        if \"ssd_io_backend\" in extra:\n            backend = str(extra[\"ssd_io_backend\"]).strip().lower()\n            if backend not in (\"posix\", \"io_uring\"):\n                raise ValueError(\n                    \"extra_config['ssd_io_backend'] must be one of: posix, io_uring\"\n                )\n            if UMBPIoBackend is not None:\n                cfg.ssd.io.backend = (\n                    UMBPIoBackend.Posix if backend == \"posix\" else UMBPIoBackend.IoUring\n                )\n        if \"ssd_durability_mode\" in extra:\n            # Validate even when the enum is unavailable (older mori / mocks).\n            durability = str(extra[\"ssd_durability_mode\"]).strip().lower()\n            if durability not in (\"strict\", \"sync\", \"relaxed\", \"async\"):\n                raise ValueError(\n                    \"extra_config['ssd_durability_mode'] must be one of: \"\n                    \"strict, sync, relaxed, async\"\n                )\n            if UMBPDurabilityMode is not None:\n                if durability in (\"strict\", \"sync\"):\n                    cfg.ssd.durability.mode = UMBPDurabilityMode.Strict\n                else:\n                    cfg.ssd.durability.mode = UMBPDurabilityMode.Relaxed\n        if \"ssd_backend\" in extra:\n            ssd_backend = str(extra[\"ssd_backend\"]).strip().lower()\n            if ssd_backend not in (\"file\", \"spdk\", \"spdk_proxy\"):\n                raise ValueError(\n                    \"extra_config['ssd_backend'] must be one of: \"\n                    \"file, spdk, spdk_proxy\"\n                )\n            cfg.ssd.ssd_backend = ssd_backend\n        if \"spdk_nvme_pci_addr\" in extra:\n            cfg.ssd.spdk_nvme_pci_addr = str(extra[\"spdk_nvme_pci_addr\"])","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/mem_cache/storage/umbp/umbp_store.py#L333-L369","documentation":"extra_config['ssd_durability_mode'] must be one of strict, sync, relaxed, async. Validation happens even if the UMBPDurabilityMode enum is unavailable (older mori or mocks), so invalid values always fail fast.","triggerScenarios":"Setting ssd_durability_mode to an unrecognized string like 'fsync', 'none', or 'async_strict' in extra_config.","commonSituations":"Guessing durability names; carrying over config from a different store version where names differed.","solutions":["Use one of: strict, sync, relaxed, async (case-insensitive)","Pick strict/sync for crash safety, relaxed/async for throughput as appropriate"],"exampleFix":"# before\nextra['ssd_durability_mode'] = 'fsync'\n# after\nextra['ssd_durability_mode'] = 'strict'","handlingStrategy":"validation","validationCode":"assert str(extra.get('ssd_durability_mode','')).strip().lower() in ('strict','sync','relaxed','async')","typeGuard":"def is_valid_durability(v) -> bool:\n    return isinstance(v, str) and v.strip().lower() in ('strict','sync','relaxed','async')","tryCatchPattern":null,"preventionTips":["Use only the four documented durability names","Add config schema validation before server start"],"tags":["umbp","config-validation","durability"],"backgroundTag":"invalid-enum-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}