{"record":{"id":"55ea759d9cc94d8b","repo":"MemPalace/mempalace","slug":"exc-the-live-collection-collection-name-was","errorCode":null,"errorMessage":"{exc}. The live collection '{collection_name}' was already replaced and the re-upload into it failed. The fully-verified pre-swap copy survives under '{temp_name}' -- do NOT delete it. Recover by removing the broken '{collection_name}' collection and promoting '{temp_name}' in its place.","messagePattern":"(.+?)\\. The live collection '(.+?)' was already replaced and the re-upload into it failed\\. The fully-verified pre-swap copy survives under '(.+?)' -- do NOT delete it\\. Recover by removing the broken '(.+?)' collection and promoting '(.+?)' in its place\\.","errorType":"exception","errorClass":"RebuildCollectionError","httpStatus":null,"severity":"error","filePath":"mempalace/repair.py","lineNumber":402,"sourceCode":"        try:\n            _delete_collection_if_exists(backend, palace_path, temp_name)\n        except Exception:\n            pass\n        return rebuilt\n    except Exception as exc:\n        if not live_replaced:\n            # The live collection was never touched -- the temp build is a\n            # discardable in-progress copy, safe to clean up on failure.\n            try:\n                _delete_collection_if_exists(backend, palace_path, temp_name)\n            except Exception:\n                pass\n            raise RebuildCollectionError(str(exc), live_replaced=live_replaced) from exc\n        # The live collection was already deleted (line 294) before this\n        # failure. `temp_name` is now the ONLY intact, verified copy of the\n        # data left on disk -- never delete it here. Point the operator\n        # at it instead of destroying the one thing that can still recover.\n        raise RebuildCollectionError(\n            f\"{exc}. The live collection '{collection_name}' was already \"\n            f\"replaced and the re-upload into it failed. The fully-verified \"\n            f\"pre-swap copy survives under '{temp_name}' -- do NOT delete it. \"\n            f\"Recover by removing the broken '{collection_name}' collection \"\n            f\"and promoting '{temp_name}' in its place.\",\n            live_replaced=live_replaced,\n        ) from exc\n\n\ndef _promote_temp_collection(\n    backend,\n    palace_path: str,\n    temp_name: str,\n    collection_name: str,\n    expected: int,\n    batch_size: int,\n    progress=print,\n) -> int:","sourceCodeStart":384,"sourceCodeEnd":420,"githubUrl":"https://github.com/MemPalace/mempalace/blob/06cb6987f02610784fefbad4b2bd5d026d164ba6/mempalace/repair.py#L384-L420","documentation":"Error \"{exc}. The live collection '{collection_name}' was already replaced and the re-upload into it failed. The fully-verified pre-swap copy survives under '{temp_name}' -- do NOT delete it. Recover by removing the broken '{collection_name}' collection and promoting '{temp_name}' in its place.\" thrown in MemPalace/mempalace.","triggerScenarios":"Thrown at mempalace/repair.py:402 when the library encounters an invalid state.","commonSituations":"Re-upload into the swapped collection failed after the original was already replaced.","solutions":["Remove the broken live collection and promote the surviving pre-swap temp copy in its place; do NOT delete the temp copy"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06cb6987f02610784fefbad4b2bd5d026d164ba6","analyzedAt":"2026-08-15T03:03:36.213Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}