Skip to content

feat: add CLIENT SETNAME for connection identification#2

Open
atao2004 wants to merge 8 commits into
daric93:feat/valkey-vector-storefrom
atao2004:feat/add-client-name
Open

feat: add CLIENT SETNAME for connection identification#2
atao2004 wants to merge 8 commits into
daric93:feat/valkey-vector-storefrom
atao2004:feat/add-client-name

Conversation

@atao2004

@atao2004 atao2004 commented May 29, 2026

Copy link
Copy Markdown

Summary

Adds client_name="docsgpt_vector_store_client" to both GlideClientConfiguration paths in valkey.py so the connection is identifiable via CLIENT LIST on the server.

Related upstream PR: arc53#2476

Changes

Two one-line additions — adds client_name to both the password and no-password config branches in _create_client().

Motivation

Connections without a name appear anonymous in CLIENT LIST. Setting client_name sends a CLIENT SETNAME command on connection, making it identifiable in monitoring dashboards and CloudWatch metrics.

Risk

Zero-risk — client_name is a metadata-only option. No behavioral changes.

daric93 and others added 8 commits May 20, 2026 12:33
…plication/vectorstore/ using valkey-glide-sync and the valkey-search module for HNSW vector similarity search. - Add ValkeyStore class extending BaseVectorStore with full interface: search, add_texts, delete_index, get_chunks, add_chunk, delete_chunk - Register 'valkey' in VectorCreator factory - Add VALKEY_* settings to Settings class (host, port, password, tls, index_name, prefix) - Add valkey-glide-sync==2.3.1 to requirements.txt - Add Valkey config examples to .env-template - Add 22 unit tests (mocked, no external deps) - Add 7 integration tests (requires running Valkey with search module)

Signed-off-by: Daria Korenieva <daric2612@gmail.com>
…aracters in source_id for tag queries (prevents malformed FT.SEARCH queries with dots, hyphens, slashes, etc.) - Use explicit password check (is not None and != '') instead of truthiness to handle empty-string env vars correctly - Add request_timeout=5000ms to GlideClientConfiguration - Use ReturnField to avoid fetching embedding blobs in search/get_chunks - Paginate delete_index and get_chunks to handle >10k documents - Batch DELETE calls (100 keys per call) for efficiency - Improve error message in add_texts to report partial write count - Add unit tests for tag escaping, batch delete, pagination, and password handling edge cases

Signed-off-by: Daria Korenieva <daric2612@gmail.com>
…ALKEY_DISTANCE_METRIC (cosine/l2/ip), VALKEY_VECTOR_TYPE (float32), and VALKEY_VECTOR_ALGORITHM (hnsw/flat) settings with safe defaults - Log chosen config at index creation time - Fall back to defaults with a warning if unrecognized values are provided - Add '|' to tag escape character set (was missing) - Support FLAT vector algorithm as alternative to HNSW - Add unit tests for all resolver methods and pipe escaping - Update .env-template and integration test fixture

Signed-off-by: Daria Korenieva <daric2612@gmail.com>
… tests - Add close() method and __del__ to release GlideClient TCP connection - _paginated_source_scan now uses ReturnField('source_id') to avoid fetching full document content (only key names needed for deletion) - _ensure_index_exists widens error matching to also catch 'index already' phrasing, reducing brittleness on different Valkey versions - Add 6 new unit tests: close() lifecycle (3), FLAT algorithm path (1), already-exists handling (1), unknown error re-raise (1) - Skipped lazy-import refactor — imports remain at module top per project style

Signed-off-by: Daria Korenieva <daric2612@gmail.com>
…re, Settings, and Postgres Migration pages to list Valkey alongside the other supported vector store backends.

Signed-off-by: Daria Korenieva <daric2612@gmail.com>
…, tag escaping, typed exceptions

Signed-off-by: Daria Korenieva <daric2612@gmail.com>
…guard in vector_creator.py (fragility concern) - Catch RequestError instead of bare Exception in _ensure_index_exists - Re-raise exceptions in delete_index so callers can handle failures - Extract shared _paginated_search generator with max-iterations guard - Add __enter__/__exit__ for deterministic connection cleanup - Cap search k to [1, 100] to prevent memory exhaustion - Make request_timeout configurable via VALKEY_REQUEST_TIMEOUT setting - Refactor integration test fixture to use real Settings instance - Update tests to match new behavior, add context manager + k bounds tests All 63 tests pass (56 unit + 7 integration).

Signed-off-by: Daria Korenieva <daric2612@gmail.com>
Adds client_name="docsgpt_vector_store_client" to both
GlideClientConfiguration paths so the connection is identifiable
via CLIENT LIST on the server.

Fixes arc53#2504

Signed-off-by: Anna Tao <annatao2004@gmail.com>
@daric93

daric93 commented Jun 3, 2026

Copy link
Copy Markdown
Owner

@atao2004 please limit this PR to setting client_name on the configuration only. Any unrelated changes should go in a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants