Issues related to the deletion of conversation_id #7588

Closed
opened 2026-02-21 18:21:22 -05:00 by yindo · 4 comments
Owner

Originally created by @Bkk-shuai on GitHub (Jan 8, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I wrote an Agent using DIY and successfully called its API, but during testing, I found that after deleting conversion_id, I could still call the deleted conversation but could not delete it again
屏幕截图 2025-01-08 164403

✔️ Expected Behavior

image
first I get the new conversation_id called 62b332d8-3a38-43d8-8ac4-8e2c1deee231
then
I used http://xxx/v1/conversations/62b332d8-3a38-43d8-8ac4-8e2c1deee231
get success
image
but When I use the same id with /v1/chat-messages

image
It's still work

Actual Behavior

I think the conversion_id after the DELETE operation should not exist

Originally created by @Bkk-shuai on GitHub (Jan 8, 2025). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.15.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I wrote an Agent using DIY and successfully called its API, but during testing, I found that after deleting conversion_id, I could still call the deleted conversation but could not delete it again ![屏幕截图 2025-01-08 164403](https://github.com/user-attachments/assets/f1425ebd-dc55-4f91-85f7-02a917cadd83) ### ✔️ Expected Behavior ![image](https://github.com/user-attachments/assets/04e5f9d9-c2c1-4cfc-a435-ed0e00aeab3c) first I get the new conversation_id called 62b332d8-3a38-43d8-8ac4-8e2c1deee231 then I used http://xxx/v1/conversations/62b332d8-3a38-43d8-8ac4-8e2c1deee231 get success ![image](https://github.com/user-attachments/assets/659dffdc-5035-44a6-9bce-7fe85f2945a7) but When I use the same id with /v1/chat-messages ![image](https://github.com/user-attachments/assets/28a54fb4-b46b-4684-8f88-af9f3d2619ee) It's still work ### ❌ Actual Behavior I think the conversion_id after the DELETE operation should not exist
yindo added the 🐞 buggood first issue labels 2026-02-21 18:21:22 -05:00
yindo closed this issue 2026-02-21 18:21:22 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 8, 2025):

Hey @Bkk-shuai! I'm here to help you with any bugs, questions, or contributions while you wait for a human maintainer. Let's tackle this issue together!

I found a similar unsolved discussion titled Help : Cannot delete conversation, which might be related to your issue [1].

Regarding your issue, the expected behavior of the DELETE operation on a conversation_id in the Dify codebase is to mark the conversation as deleted by setting the is_deleted attribute to True, rather than permanently removing it from the database. This means that while the conversation is marked as deleted, it might still be accessible for certain operations, which seems to be what you're experiencing [2].

If you are able to interact with a conversation after it has been marked as deleted, it might be due to the system's design to allow certain operations on "soft-deleted" conversations. However, if this behavior is not what you expect, it might be worth checking if there are any configuration settings or additional logic in your implementation that could affect this behavior.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Jan 8, 2025): <!-- Greeting --> Hey @Bkk-shuai! I'm here to help you with any bugs, questions, or contributions while you wait for a human maintainer. Let's tackle this issue together! <!-- Answer --> I found a similar unsolved discussion titled [Help : Cannot delete conversation](https://github.com/langgenius/dify/discussions/11276), which might be related to your issue <sup>[[1]](https://github.com/langgenius/dify/discussions/11276)</sup>. Regarding your issue, the expected behavior of the DELETE operation on a `conversation_id` in the Dify codebase is to mark the conversation as deleted by setting the `is_deleted` attribute to `True`, rather than permanently removing it from the database. This means that while the conversation is marked as deleted, it might still be accessible for certain operations, which seems to be what you're experiencing <sup>[[2]](https://github.com/langgenius/dify/blob/main/sdks/python-client/dify_client/client.py)</sup>. If you are able to interact with a conversation after it has been marked as deleted, it might be due to the system's design to allow certain operations on "soft-deleted" conversations. However, if this behavior is not what you expect, it might be worth checking if there are any configuration settings or additional logic in your implementation that could affect this behavior. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d33843be-870e-4d15-962c-b9ab555b7b75?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d33843be-870e-4d15-962c-b9ab555b7b75?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d33843be-870e-4d15-962c-b9ab555b7b75?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d33843be-870e-4d15-962c-b9ab555b7b75?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d33843be-870e-4d15-962c-b9ab555b7b75?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/d33843be-870e-4d15-962c-b9ab555b7b75?feedback_type=other)</sup>
Author
Owner

@Bkk-shuai commented on GitHub (Jan 8, 2025):

嘿 !在您等待人工维护者时,我在这里帮助您解决任何错误、问题或贡献。让我们一起解决这个问题!

我发现了一个类似的未解决的讨论,标题为 Help : Cannot delete conversation,这可能与您的问题有关[1].

关于您的问题,在 Dify 代码库中对 a 执行 DELETE 操作的预期行为是通过将属性设置为 ,而不是将其从数据库中永久删除,从而将对话标记为已删除。这意味着,虽然对话被标记为已删除,但某些操作可能仍可访问它,这似乎就是您正在经历的情况conversation_id``is_deleted``True[2].

如果会话被标记为已删除后,您能够与会话进行交互,则可能是由于系统的设计允许对 “soft-deleted” 会话执行某些操作。但是,如果此行为不是您所期望的,则可能值得检查您的实施中是否有任何可能影响此行为的配置设置或其他逻辑。

要继续与 Dosu 交谈,请提及 。

帮助 Dosu 学习!给它反馈:伟大的回应 |无关紧要的答案 |不正确的来源 |太冗长 |幻觉 |其他

If I have a large number of new conversation requests or if the same user restarts new conversations, will it cause system congestion

@Bkk-shuai commented on GitHub (Jan 8, 2025): > 嘿 !在您等待人工维护者时,我在这里帮助您解决任何错误、问题或贡献。让我们一起解决这个问题! > > 我发现了一个类似的未解决的讨论,标题为 [Help : Cannot delete conversation](https://github.com/langgenius/dify/discussions/11276),这可能与您的问题有关[[1]](https://github.com/langgenius/dify/discussions/11276). > > 关于您的问题,在 Dify 代码库中对 a 执行 DELETE 操作的预期行为是通过将属性设置为 ,而不是将其从数据库中永久删除,从而将对话标记为已删除。这意味着,虽然对话被标记为已删除,但某些操作可能仍可访问它,这似乎就是您正在经历的情况`conversation_id``is_deleted``True`[[2]](https://github.com/langgenius/dify/blob/main/sdks/python-client/dify_client/client.py). > > 如果会话被标记为已删除后,您能够与会话进行交互,则可能是由于系统的设计允许对 “soft-deleted” 会话执行某些操作。但是,如果此行为不是您所期望的,则可能值得检查您的实施中是否有任何可能影响此行为的配置设置或其他逻辑。 > > _要继续与 [Dosu](https://dosu.dev) 交谈,请提及 。_ > > 帮助 Dosu 学习!给它反馈:[伟大的回应](https://app.dosu.dev/response-feedback/d33843be-870e-4d15-962c-b9ab555b7b75?feedback_type=great_response) |[无关紧要的答案](https://app.dosu.dev/response-feedback/d33843be-870e-4d15-962c-b9ab555b7b75?feedback_type=irrelevant_answer) |[不正确的来源](https://app.dosu.dev/response-feedback/d33843be-870e-4d15-962c-b9ab555b7b75?feedback_type=incorrect_sources) |[太冗长](https://app.dosu.dev/response-feedback/d33843be-870e-4d15-962c-b9ab555b7b75?feedback_type=too_verbose) |[幻觉](https://app.dosu.dev/response-feedback/d33843be-870e-4d15-962c-b9ab555b7b75?feedback_type=hallucination) |[其他](https://app.dosu.dev/response-feedback/d33843be-870e-4d15-962c-b9ab555b7b75?feedback_type=other) If I have a large number of new conversation requests or if the same user restarts new conversations, will it cause system congestion
Author
Owner

@dosubot[bot] commented on GitHub (Jan 8, 2025):

I couldn't find specific information on how Dify handles high volumes of conversation requests or if it has built-in mechanisms for throttling to prevent system congestion. However, generally, handling a large number of requests efficiently would involve implementing rate limiting, load balancing, and optimizing database queries. You might want to check if there are any configuration settings or infrastructure setups in your deployment that can help manage high traffic.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Jan 8, 2025): <!-- Answer --> I couldn't find specific information on how Dify handles high volumes of conversation requests or if it has built-in mechanisms for throttling to prevent system congestion. However, generally, handling a large number of requests efficiently would involve implementing rate limiting, load balancing, and optimizing database queries. You might want to check if there are any configuration settings or infrastructure setups in your deployment that can help manage high traffic. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/9e7ae9ba-a589-47fc-8723-1d9b847d00fc?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/9e7ae9ba-a589-47fc-8723-1d9b847d00fc?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/9e7ae9ba-a589-47fc-8723-1d9b847d00fc?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/9e7ae9ba-a589-47fc-8723-1d9b847d00fc?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9e7ae9ba-a589-47fc-8723-1d9b847d00fc?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/9e7ae9ba-a589-47fc-8723-1d9b847d00fc?feedback_type=other)</sup>
Author
Owner

@kartik-raj7 commented on GitHub (Jan 9, 2025):

Hey Could you please assign me this issue

@kartik-raj7 commented on GitHub (Jan 9, 2025): Hey Could you please assign me this issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7588