{"record":{"id":"e2507df1bc4b4bca","repo":"chroma-core/chroma","slug":"resetting-the-database-is-not-allowed-set-allow-e2507d","errorCode":null,"errorMessage":"Resetting the database is not allowed. Set `allow_reset` to true in the config in tests or other non-production environments where reset should be permitted.","messagePattern":"Resetting the database is not allowed\\. Set `allow_reset` to true in the config in tests or other non-production environments where reset should be permitted\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"chromadb/segment/impl/distributed/segment_directory.py","lineNumber":109,"sourceCode":"        self._curr_memberlist = None\n        self._memberlist_name = None\n\n        # Stop the watch thread\n        self._kill_watch_thread.set()\n        if self._watch_thread is not None:\n            self._watch_thread.join()\n        self._watch_thread = None\n        self._kill_watch_thread.clear()\n        self._done_waiting_for_reset.clear()\n        return super().stop()\n\n    @override\n    def reset_state(self) -> None:\n        # Reset the memberlist in kubernetes, and wait for it to\n        # get propagated back again\n        # Note that the component must be running in order to reset the state\n        if not self._system.settings.require(\"allow_reset\"):\n            raise ValueError(\n                \"Resetting the database is not allowed. Set `allow_reset` to true in the config in tests or other non-production environments where reset should be permitted.\"\n            )\n        if self._memberlist_name:\n            self._done_waiting_for_reset.clear()\n            self._kubernetes_api.patch_namespaced_custom_object(\n                group=KUBERNETES_GROUP,\n                version=\"v1\",\n                namespace=KUBERNETES_NAMESPACE,\n                plural=\"memberlists\",\n                name=self._memberlist_name,\n                body={\n                    \"kind\": \"MemberList\",\n                    \"spec\": {\"members\": []},\n                },\n            )\n            self._done_waiting_for_reset.wait(5.0)\n            # TODO: For some reason the above can flake and the memberlist won't be populated\n            # Given that this is a test harness, just sleep for an additional 500ms for now","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/segment/impl/distributed/segment_directory.py#L91-L127","documentation":"Error \"Resetting the database is not allowed. Set `allow_reset` to true in the config in tests or other non-production environments where reset should be permitted.\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/segment/impl/distributed/segment_directory.py:109 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}