dosubot[bot] commented on issue #3059: URL: https://github.com/apache/hugegraph/issues/3059#issuecomment-4705098868
<!-- Answer --> If the force-delete API is also hanging (because the problematic task monopolizes resources too fast after restart), here are some more aggressive options: **Option 1: Switch to distributed scheduler to prevent task restoration** Before restarting, edit your graph configuration (e.g., `conf/graphs/hugegraph.properties`) and add: ```properties task.scheduler_type=distributed ``` The distributed scheduler's `restoreTasks()` is effectively a no-op [[1]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/DistributedTaskScheduler.java), so the stuck task won't immediately re-queue on startup. This gives you time to call the force-delete API. After cleanup, you can switch back to the standard scheduler. **Option 2: Delete and recreate the graph** If you can afford to lose the graph data, the fastest recovery is to: 1. Stop the server 2. Delete the RocksDB data directory for that graph (default path: `rocksdb-data/` under your HugeGraph install) [[2]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBOptions.java) 3. Restart the server and recreate the graph Unfortunately, task vertices share the same column family ("V") as regular graph vertices [[3]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java), so there's no way to surgically remove just the task data from RocksDB files without custom code. **Option 3: Race the force-delete** Check your server logs for the task ID being restored (it should appear during startup). Then: 1. Restart the server 2. Immediately (within seconds) run: ```bash curl -X DELETE "http://{IP}:{PORT}/graphs/{GRAPH_NAME}/tasks/{TASK_ID}?force=true" ``` If the API responds at all in the first few seconds before the task fully loads, this can succeed. Could you share what specifically happens when you try the force-delete? Does it time out, return an error, or never respond at all? <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fhugegraph).* --- Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fhugegraph). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fhugegraph&message_id=ac9d0e7f-0950-42b3-8fcb-160e3b3c2d9e) [](https://github.dosu.com/apache/hugegraph?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fhugegraph) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fhugegraph) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
