Commit graph

705 commits

Author SHA1 Message Date
yangdx
7e988158a9 Fix: Resolve timezone handling problem in PostgreSQL storage
- Changed timestamp columns to naive UTC
- Added datetime formatting utilities
- Updated SQL templates for timestamp extraction
- Simplified timestamp migration logic
2025-07-14 04:12:52 +08:00
yangdx
157fb4c871 Increase field lengths for entity and file paths for PostgreSQL
- Expand entity_name length to 512 chars
- Increase source/target ID lengths
- Convert file_path to TEXT type
- Add migration logic
2025-07-14 00:24:54 +08:00
yangdx
187a623125 Increase max length limits for Milvus storage fields
- Extended entity_name max_length to 512
- Increased entity_type max_length to 128
- Expanded file_path limits to 1024
- Raised src_id/tgt_id limits to 512
2025-07-13 23:13:45 +08:00
yangdx
6730a89d7c Hotfix: Resolves connection pool bugs for Redis
- The previous implementation of the shared Redis connection pool had a critical issue where any Redis storage instance would disconnect the global shared pool upon closing. This caused `ConnectionError` exceptions for other instances still using the pool.
- This commit resolves the issue by introducing a reference counting mechanism in `RedisConnectionManager`.
2025-07-13 22:54:34 +08:00
yangdx
85cd1178a1 fix: prevent premature lock cleanup in multiprocess mode
- Change cleanup condition from count == 1 to count == 0 to properly
remove reused locks from cleanup list
- Fix RuntimeError: Attempting to release lock for xxxx more times than it was acquired
2025-07-13 13:51:48 +08:00
yangdx
a2eeae9661 Fixes incorrect cleanup count 2025-07-13 02:38:36 +08:00
yangdx
582e952020 Disable direct logging by default for shared storage module 2025-07-13 01:58:50 +08:00
yangdx
cbf544b3c1 Remvoe redundant log message 2025-07-13 01:51:30 +08:00
yangdx
0e3aaa318f Feat: Add keyed lock cleanup and status monitoring 2025-07-13 00:09:00 +08:00
yangdx
2ade3067f8 Refac: Generalize keyed lock with namespace support
Refactored the `KeyedUnifiedLock` to be generic and support dynamic namespaces. This decouples the locking mechanism from a specific "GraphDB" implementation, allowing it to be reused across different components and workspaces safely.

Key changes:
- `KeyedUnifiedLock` now takes a `namespace` parameter on lock acquisition.
- Renamed `_graph_db_lock_keyed` to a more generic _storage_keyed_lock`
- Replaced `get_graph_db_lock_keyed` with get_storage_keyed_lock` to support namespaces
2025-07-12 12:10:12 +08:00
yangdx
f2d875f8ab Update comments 2025-07-12 11:05:25 +08:00
yangdx
5ee509e671 Fix linting 2025-07-12 05:17:44 +08:00
yangdx
964293f21b Optimize lock cleanup with time tracking and intervals
- Add cleanup time tracking variables
- Implement minimum cleanup intervals
- Track earliest cleanup times
- Handle time rollback cases
- Improve cleanup logging
2025-07-12 04:34:26 +08:00
yangdx
39965d7ded Move merging stage back controled by max parallel insert semhore 2025-07-12 03:32:08 +08:00
yangdx
7490a18481 Optimize lock cleanup parameters 2025-07-12 03:10:03 +08:00
yangdx
3d8e6924bc Show lock clean up message 2025-07-12 02:58:05 +08:00
yangdx
22c36f2fd2 Optimize log messages 2025-07-12 02:41:31 +08:00
yangdx
a64c767298 optimize: improve lock cleanup performance with threshold-based strategy
- Add CLEANUP_THRESHOLD constant (100) to control cleanup frequency
- Modify _release_shared_raw_mp_lock to only scan when cleanup list exceeds threshold
- Modify _release_async_lock to only scan when cleanup list exceeds threshold
2025-07-11 23:43:40 +08:00
yangdx
ad99d9ba5a Improve code organization and comments 2025-07-11 22:13:02 +08:00
yangdx
c52c451cf7 Fix linting 2025-07-11 20:40:50 +08:00
yangdx
3afdd1b67c Fix initial count error for multi-process lock with key 2025-07-11 20:39:08 +08:00
yangdx
207f0a7f2a Merge branch 'main' into merge_lock_with_key 2025-07-09 09:25:28 +08:00
DavIvek
08eb68b8ed run pre-commit 2025-07-08 20:21:20 +02:00
DavIvek
4438897b6b add changes based on review 2025-07-08 16:28:06 +02:00
yangdx
56d43de58a Merge branch 'main' into merge_lock_with_key 2025-07-08 12:46:31 +08:00
yangdx
2670f8dc98 Merge branch 'main' into add-Memgraph-graph-db 2025-07-08 00:31:46 +08:00
yangdx
ef79088f60 Move max_graph_nodes to global config 2025-07-07 21:53:57 +08:00
yangdx
7a7a01b68b Fix linting 2025-07-07 04:44:06 +08:00
yangdx
9e823de74e Exit program on vector index creation failure for MongoDB 2025-07-07 04:43:46 +08:00
yangdx
809f839c07 Merge branch 'main' into add-Memgraph-graph-db 2025-07-07 04:29:12 +08:00
yangdx
4632adb355 Add NEO4J_WORKSPACE env var override support
- Allow workspace override via NEO4J_WORKSPACE
- Update env.example with new config option
2025-07-07 04:16:44 +08:00
yangdx
da8655002a Add composite indexes for workspace+id columns for PostgreSQL 2025-07-07 03:36:49 +08:00
yangdx
907f2313cd Improve MongoDB vector index handling with workspace support
- Add workspace-specific index naming
- Store index name as instance variable
2025-07-07 03:19:41 +08:00
yangdx
033098c1bc Feat: Add WORKSPACE support to all storage types 2025-07-07 00:57:21 +08:00
yangdx
a567601da2 Merge branch 'main' into add-Memgraph-graph-db 2025-07-05 13:14:39 +08:00
yangdx
86a00ed333 Remove deprecated storage type 2025-07-05 13:11:32 +08:00
yangdx
bdfd2d53c7 Fix linting 2025-07-05 11:43:45 +08:00
yangdx
2e2b9f3b48 Refactor setup.py to utilize pyproject.toml for project installation. 2025-07-05 11:19:00 +08:00
yangdx
99bb25a282 Update logger message 2025-07-05 08:21:54 +08:00
yangdx
8ce2223e58 Merge branch 'main' into add-Memgraph-graph-db 2025-07-05 07:56:14 +08:00
yangdx
2d78d74055 Fix milvus compatible check error 2025-07-05 07:55:36 +08:00
yangdx
fb979be9ff Fix linting 2025-07-05 07:09:33 +08:00
yangdx
b842a80aab Fix linting 2025-07-05 07:09:01 +08:00
yangdx
9878dc7f51 fix: ensure Milvus collections are loaded before operations
- Resolves "collection not loaded" MilvusException errors
2025-07-05 00:40:25 +08:00
yangdx
2f7cef968d fix: ensure Milvus collections are loaded before operations
- Resolves "collection not loaded" MilvusException errors
2025-07-05 00:32:55 +08:00
yangdx
4ea38456f0 Improve graph query robustness and error handling 2025-07-05 00:31:52 +08:00
yangdx
a69194c079 Merge branch 'main' into add-Memgraph-graph-db 2025-07-04 23:53:07 +08:00
yangdx
7ec4ba5f9a Fix: recover faiss_impl.py 2025-07-04 23:50:27 +08:00
yangdx
951ea3b851 Remvoe deprecated storage type 2025-07-04 21:48:18 +08:00
yangdx
6201c7fb56 Refactoring Milvus implementation 2025-07-04 21:42:10 +08:00