33 Commits

Author SHA1 Message Date
yangdx
05cf029bcc fix: convert multiprocessing managed dict to normal dict before JSON dump 2025-02-27 20:16:53 +08:00
yangdx
64f22966a3 Fix linting 2025-02-27 19:05:51 +08:00
yangdx
f007ebf006 Refactor initialization logic for vector, KV and graph storage implementations
• Add try_initialize_namespace check
• Move init code out of storage locks
• Reduce redundant init conditions
• Simplify initialization flow
• Make init thread-safer
2025-02-27 14:55:07 +08:00
yangdx
7436c06f6c Fix linting 2025-02-26 18:11:16 +08:00
yangdx
2c019dbc7b Refactor storage initialization to avoid redundant intitial data loads across processes, show init logs to first load only 2025-02-26 12:28:49 +08:00
yangdx
2752a764ae Refactor storage implementations to support both single and multi-process modes
• Add shared storage management module
• Support process/thread lock based on mode
2025-02-26 05:38:38 +08:00
yangdx
a642bb3190 refactor: use shared manager from main process for storage implementations. 2025-02-25 12:08:49 +08:00
yangdx
087d5770b0 feat(storage): Add shared memory support for file-based storage implementations
This commit adds multiprocessing shared memory support to file-based storage implementations:
- JsonDocStatusStorage
- JsonKVStorage
- NanoVectorDBStorage
- NetworkXStorage

Each storage module now uses module-level global variables with multiprocessing.Manager() to ensure data consistency across multiple uvicorn workers. All processes will see
updates immediately when data is modified through ainsert function.
2025-02-25 11:10:13 +08:00
Yannick Stephan
9277fe8c29 fixed return 2025-02-19 22:22:41 +01:00
Yannick Stephan
0994d478f0 cleaned code 2025-02-18 10:21:54 +01:00
Yannick Stephan
fc0cf2934e fixed drop 2025-02-18 10:21:14 +01:00
Yannick Stephan
fc4b830036 fallback default drops 2025-02-18 08:43:23 +01:00
Yannick Stephan
66c4b01fdd remove drops unused 2025-02-17 23:16:23 +01:00
Yannick Stephan
0b16718f9f add missing final 2025-02-16 16:21:28 +01:00
Yannick Stephan
3fef8201c6 added final, required methods and cleaned import 2025-02-16 14:38:09 +01:00
Yannick Stephan
931c31fa8c cleaned code 2025-02-16 13:55:30 +01:00
Yannick Stephan
71a18d1de9 updated clean of what implemented on BaseKVStorage 2025-02-16 13:31:12 +01:00
zrguo
ef0e81315f fix linting 2025-02-16 19:53:28 +08:00
St1ve
edaba428ac
Update json_kv_impl.py
There is no delete function in chunks_vdb and text_chunks in lines 1300-1302 of the lightrag.py file:
    if chunk_ids:
                await self.chunks_vdb.delete(chunk_ids)
                await self.text_chunks.delete(chunk_ids)
2025-02-16 19:33:59 +08:00
Yannick Stephan
9f6621454e fixed ids 2025-02-09 21:24:13 +01:00
Yannick Stephan
62115b836f cleaned set 2025-02-09 20:03:15 +01:00
Yannick Stephan
6480ddee5d cleaned code 2025-02-09 19:51:05 +01:00
Yannick Stephan
7d63898015 fixed bugs 2025-02-09 19:21:49 +01:00
Yannick Stephan
7116bd1872 cleaned code 2025-02-09 15:24:30 +01:00
Yannick Stephan
82481ecf28 cleaned code 2025-02-09 14:55:52 +01:00
Yannick Stephan
4cce14e65e cleaned import 2025-02-09 11:24:08 +01:00
Yannick Stephan
31fe96d74a cleaned optional not used 2025-02-09 10:33:15 +01:00
Yannick Stephan
50c7f26262 cleanup code 2025-02-08 23:58:15 +01:00
Yannick Stephan
5a082a0052 cleaned code 2025-02-08 23:20:37 +01:00
Yannick Stephan
cff415d91f implemented method and cleaned the mess 2025-02-08 23:18:12 +01:00
Yannick Stephan
fe3050adce updated json kv 2025-02-08 23:02:40 +01:00
zrguo
80451af839 fix linting errors 2025-01-27 23:21:34 +08:00
Saifeddine ALOUI
56e9c9f4d5
Moved the storages to kg folder 2025-01-27 09:59:26 +01:00