dify icon indicating copy to clipboard operation
dify copied to clipboard

Document are re-indexed without stopping

Open Qiuzg opened this issue 2 years ago • 3 comments

Self Checks

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

Dify version

0.9.1-fix1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Upload more than 100 files each time, and repeat this step multiple times, RabbitMQ unacked count will not reduce to 0 Some documents will be re-indexed even if they had already been indexed

✔️ Expected Behavior

All documents are indexed successfully

❌ Actual Behavior

Some documents will be re-indexed even if they had already been indexed

Qiuzg avatar Oct 29 '24 06:10 Qiuzg

Sorry we do not use RabbitMQ.

crazywoola avatar Oct 29 '24 07:10 crazywoola

@Qiuzg Hello there! I'm here to assist you with any bugs, questions, and contributions related to Dify. Let's work together to resolve this issue.

I couldn't find a specific solution to the issue of documents being re-indexed unnecessarily in the Dify repository. However, Dify does have a mechanism to prevent unnecessary re-indexing by cleaning old data before processing a document. The code checks for existing document segments and deletes them from the vector index if they exist, ensuring that only new or updated data is indexed [1].

For the issue with RabbitMQ's unacked count not reducing to zero, I couldn't find specific information in the repository. It might be helpful to check the configuration and logs of RabbitMQ and Celery to ensure that tasks are being acknowledged properly and that there are no errors in task processing.

If the problem persists, reviewing the logs for any errors or warnings related to task processing might provide more insights into the issue.

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Oct 29 '24 07:10 dosubot[bot]

Sorry we do not use RabbitMQ.

@crazywoola This has nothing to do with the use of RabbitMQ or Redis. This is a mechanism of Celery, and you can refer to https://github.com/celery/celery/blob/main/docs/getting-started/backends-and-brokers/redis.rst#visibility-timeout

wy96f avatar Oct 30 '24 02:10 wy96f