{"record":{"id":"24ff0467100b30f1","repo":"phacility/phabricator","slug":"there-are-multiple-chunks-in-byte-range-d-d","errorCode":null,"errorMessage":"There are multiple chunks in byte range %d - %d.","messagePattern":"There are multiple chunks in byte range (.+?) - (.+?)\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/files/conduit/FileConduitAPIMethod.php","lineNumber":51,"sourceCode":"\n    $start = (int)$start;\n    $end = (int)$end;\n\n    $chunks = $this->newChunkQuery($viewer, $file)\n      ->withByteRange($start, $end)\n      ->execute();\n\n    if (!$chunks) {\n      throw new Exception(\n        pht(\n          'There are no file data chunks in byte range %d - %d.',\n          $start,\n          $end));\n    }\n\n    if (count($chunks) !== 1) {\n      phlog($chunks);\n      throw new Exception(\n        pht(\n          'There are multiple chunks in byte range %d - %d.',\n          $start,\n          $end));\n    }\n\n    $chunk = head($chunks);\n    if ($chunk->getByteStart() != $start) {\n      throw new Exception(\n        pht(\n          'Chunk start byte is %d, not %d.',\n          $chunk->getByteStart(),\n          $start));\n    }\n\n    if ($chunk->getByteEnd() != $end) {\n      throw new Exception(\n        pht(","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/files/conduit/FileConduitAPIMethod.php#L33-L69","documentation":"Consistency guard in loadFileChunkForUpload: exactly one chunk must cover the requested byte range, but the query matched several. This indicates server-side chunk data is inconsistent/overlapping for that range (the offending chunk rows are phlog'd), so the upload cannot proceed safely.","triggerScenarios":"Thrown at src/applications/files/conduit/FileConduitAPIMethod.php:51 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the phlog output for the overlapping chunk rows","Restart the upload to have the server reallocate a clean chunk layout","Have an administrator repair or clear the corrupted chunk records"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","contentChangedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}