-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[Bug]: HTTP API delete_chunks:Inconsistent Behavior: chunk_ids=[] Deletes All Chunks in Infinity But None in Elasticsearch #6607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@asiroliu Hello there! I'm here to help you with any bugs, questions, or contributions you might have. Let's tackle this issue together! The issue you're experiencing is due to inconsistent behavior in the This inconsistency can indeed lead to unintended data loss when using Infinity. To address this, you might consider implementing a check in the API to ensure that an empty Unfortunately, I couldn't find specific documentation or code comments within the repository that explain the intended behavior for this scenario. It might be beneficial to review the logic in the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
@liwenju0 {"code": 102, "message": "rm_chunk deleted chunks 5, expect 0"} |
…ssage (#6643) …gic to return the correct deletion message. Add handling for empty arrays to ensure no errors occur during the deletion operation. Update the test cases to verify the new logic. ### What problem does this PR solve? fix this bug:#6607 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Co-authored-by: wenju.li <[email protected]>
Self Checks
RAGFlow workspace code commit ID
x
RAGFlow image version
166d24a3c485(infiniflow/ragflow:nightly)
Other environment information
Actual behavior
When passing an empty array chunk_ids=[] to the delete chunks API:
With DOC_ENGINE=infinity: Deletes ALL chunks under the document
With DOC_ENGINE=elasticsearch: Performs NO deletion
This inconsistency between engines may lead to accidental data loss.
Expected behavior
No response
Steps to reproduce
Additional information
No response
The text was updated successfully, but these errors were encountered: