Search code examples
dolphindbdrop-tabledrop-database

Unable to delete DolphinDB DFS database due to “RECOVERING state” and missing file path error


I’m trying to delete a DFS database named stock in DolphinDB. According to the documentation, I attempted to use dropTable but encountered an error. Here’s what I did:

Code Executed: db = database("dfs://stock") dropTable(db, "stock") Error Received: RemoteRun[controller8700] getFileBlocksMeta on path '/stock/stock.tbl' failed, reason: path does not exist

I tried to use dropDatabase("dfs://stock"), but received an error 'the database is in RECOVERING state and cannot be deleted'

And i had restarted the DolphinDB cluster, but the issue persists.

DolphinDB version: 2.00.10 Deployment: Multi-machine cluster (1 controller, 2 agents, 2 data nodes) OS: Linux


Solution

  • First, use dropPartition (or use dropRecoveringPartitions from the ops module) to forcefully remove partitions from each table, and then use dropDatabase to delete the entire database.