[PR #20693] revert weaviate-client version to speed up knowledge store search #29469

Closed
opened 2026-02-21 20:45:37 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/20693

State: closed
Merged: No


Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

In his PR(https://github.com/langgenius/dify/pull/19003) the weaviate-client bump the from 3.21.0 to 3.24.2.

And the weaviate-client 3.24.0(https://github.com/weaviate/weaviate-python-client/commit/254cb85b2ebcc9500fd362adfeff4d4e3ae72528) introduce a new warning check to call pypi.org for getting latest verison when initing the client. The pypi HTTP request will take several seconds to finish, and even worse in CN(sometimes ~10 sec in my local test).
Here is the debug log for my local test:

2025-06-04 09:03:13.955 DEBUG [ThreadPoolExecutor-10_0] [connectionpool.py:241] - Starting new HTTP connection (1): weaviate:8080
2025-06-04 09:03:13.955 DEBUG [ThreadPoolExecutor-10_0] [connectionpool.py:544] - http://weaviate:8080 "GET /v1/meta HTTP/1.1" 200 64
2025-06-04 09:03:13.956 DEBUG [ThreadPoolExecutor-10_0] [connectionpool.py:1049] - Starting new HTTPS connection (1): pypi.org:443
2025-06-04 09:03:15.164 DEBUG [ThreadPoolExecutor-10_0] [connectionpool.py:544] - https://pypi.org:443 "GET /pypi/weaviate-client/json HTTP/1.1" 200 70887

There are several issues(https://github.com/langgenius/dify/issues/19839) reporting the slow knowledge store search for default weaviate setting after dify 1.4.0.

Since the original PR to bump the weaviate-client is irrelevance, we revert the verison in this PR. Another option is bump weaviate-client to >v3.24.2 which set th pypi http call timeout to 1 second, or latest version v3.26.7 which remove the warning check, but it will change lots of dependencies.

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/20693 **State:** closed **Merged:** No --- > [!IMPORTANT] > > 1. Make sure you have read our [contribution guidelines](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) > 2. Ensure there is an associated issue and you have been assigned to it > 3. Use the correct syntax to link this PR: `Fixes #<issue number>`. ## Summary In his PR(https://github.com/langgenius/dify/pull/19003) the weaviate-client bump the from 3.21.0 to 3.24.2. And the weaviate-client 3.24.0(https://github.com/weaviate/weaviate-python-client/commit/254cb85b2ebcc9500fd362adfeff4d4e3ae72528) introduce a new warning check to call pypi.org for getting latest verison when initing the client. The pypi HTTP request will take several seconds to finish, and even worse in CN(sometimes ~10 sec in my local test). Here is the debug log for my local test: ``` 2025-06-04 09:03:13.955 DEBUG [ThreadPoolExecutor-10_0] [connectionpool.py:241] - Starting new HTTP connection (1): weaviate:8080 2025-06-04 09:03:13.955 DEBUG [ThreadPoolExecutor-10_0] [connectionpool.py:544] - http://weaviate:8080 "GET /v1/meta HTTP/1.1" 200 64 2025-06-04 09:03:13.956 DEBUG [ThreadPoolExecutor-10_0] [connectionpool.py:1049] - Starting new HTTPS connection (1): pypi.org:443 2025-06-04 09:03:15.164 DEBUG [ThreadPoolExecutor-10_0] [connectionpool.py:544] - https://pypi.org:443 "GET /pypi/weaviate-client/json HTTP/1.1" 200 70887 ``` There are several issues(https://github.com/langgenius/dify/issues/19839) reporting the slow knowledge store search for default weaviate setting after dify 1.4.0. Since the original PR to bump the weaviate-client is irrelevance, we revert the verison in this PR. Another option is bump weaviate-client to >v3.24.2 which set th pypi http call timeout to 1 second, or latest version v3.26.7 which remove the warning check, but it will change lots of dependencies. ## Screenshots | Before | After | |--------|-------| | ... | ... | ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:45:37 -05:00
yindo closed this issue 2026-02-21 20:45:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#29469