{"record":{"id":"5a74f95b8f9bf066","repo":"microsoft/FASTER","slug":"no-such-address-exists","errorCode":null,"errorMessage":"No such address exists","messagePattern":"No such address exists","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"cs/src/core/Device/TieredStorageDevice.cs","lineNumber":171,"sourceCode":"            foreach (IDevice device in devices)\n            {\n                string formatString = \"{0}, file name {1}, capacity {2} bytes;\";\n                string capacity = device.Capacity == Devices.CAPACITY_UNSPECIFIED ? \"unspecified\" : device.Capacity.ToString();\n                result.AppendFormat(formatString, device.GetType().Name, device.FileName, capacity);\n            }\n            result.AppendFormat(\"commit point: {0} at tier {1}\", devices[commitPoint].GetType().Name, commitPoint);\n            return result.ToString();\n        }\n\n        private int FindClosestDeviceContaining(int segment)\n        {\n            // Can use binary search, but 1) it might not be faster than linear on a array assumed small, and 2) C# built in does not guarantee first element is returned on duplicates.\n            // Therefore we are sticking to the simpler approach at first.\n            for (int i = 0; i < devices.Count; i++)\n            {\n                if (devices[i].StartSegment <= segment) return i;\n            }\n            throw new ArgumentException(\"No such address exists\");\n        }\n    }\n}\n","sourceCodeStart":153,"sourceCodeEnd":175,"githubUrl":"https://github.com/microsoft/FASTER/blob/321d872eabda6a0345c8bd76419f89723ed864ae/cs/src/core/Device/TieredStorageDevice.cs#L153-L175","documentation":"TieredStorageDevice fans reads/writes across multiple tiered devices by locating the device whose StartSegment range covers a given segment id. FindClosestDeviceContaining linearly scans the devices; if no device's StartSegment is <= the requested segment, the address lies outside all tiers and an ArgumentException is thrown.","triggerScenarios":"Calling FindClosestDeviceContaining (directly or via ReadAsync/WriteAsync on TieredStorageDevice) with a segment id smaller than the first tier's StartSegment (e.g., a checkpoint address from an earlier configuration) or one beyond every configured tier.","commonSituations":"Restoring a checkpoint taken with a different tier layout; shrinking the tier configuration while old data addresses persist in the index; CPR/disk-based checkpoints referencing addresses the current device set no longer covers; the null device (capacity -1) receiving an actual address.","solutions":["Ensure the address/segment belongs to one of the configured tiers; verify firstDevice.StartSegment is 0 (or <= the smallest valid segment).","Restore checkpoints with the same device-tier configuration that produced them.","Add a tier whose StartSegment covers the missing segment range.","Check whether you mistakenly passed a logical address instead of the expected segment-relative value."],"exampleFix":"// before\n// tier setup where first tier starts at segment 8; index still holds addresses from segment 0\nvar dev = new TieredStorageDevice(new[] { tier1, tier2 }); // tier1.StartSegment = 8\n// after\nvar dev = new TieredStorageDevice(new[] { tier0 /* covers StartSegment 0 */, tier1, tier2 });","handlingStrategy":"validation","validationCode":"bool covered = devices.Any(d => d.StartSegment <= segment);\nif (!covered) throw new ArgumentOutOfRangeException(nameof(segment), $\"Segment {segment} not covered by any tier\");","typeGuard":null,"tryCatchPattern":"try { device.ReadAsync(...); } catch (ArgumentException e) when (e.Message == \"No such address exists\") { log.LogError(e, \"Address {Address} not covered by tier layout\", address); }","preventionTips":["Keep the lowest tier's StartSegment at 0 so all valid segments are covered.","Restore checkpoints only with the same tier configuration that created them.","Confirm you are passing the address format the tiered device expects."],"tags":["storage-device","tiering","address-range","argument"],"backgroundTag":"value-out-of-range","analyzedSha":"321d872eabda6a0345c8bd76419f89723ed864ae","analyzedAt":"2026-09-15T22:18:00.693Z","contentChangedAt":"2026-09-15T22:18:00.693Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}