feat(lancedb): enable GooseFS config in UI and fill missing DB icons - #838
feat(lancedb): enable GooseFS config in UI and fill missing DB icons#838XuQianJin-Stars wants to merge 2 commits into
Conversation
Share GooseFS/COS storage_options resolution so UI and CLI both pick up GOOSEFS_* env vars, expose IVF_HNSW_SQ/PQ in Run Test, allow concurrent loads, and reuse existing icons for DBs without dedicated assets.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: XuQianJin-Stars The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/assign @XuanYang-cn |
|
Hi @XuanYang-cn, all checks have passed and there are no conflicts. Could you help review this PR when you get a chance? Thanks! |
| # manifest commits with optimistic-concurrency retries. So multiple worker | ||
| # threads can share one connection. Set to True to let ConcurrentInsertRunner | ||
| # use max_workers > 1 for parallel data loading. | ||
| thread_safe: bool = True |
There was a problem hiding this comment.
vectordb_bench/backend/clients/lancedb/lancedb.py line:37
Medium ---- Enabling shared concurrent writes exposes the existing multi-fragment retry path: insert_embeddings() can commit an earlier LANCEDB_BATCH_SIZE chunk, fail on a later table.add(), return (0, error), and ConcurrentInsertRunner then retries the whole batch. With NUM_PER_BATCH > LANCEDB_BATCH_SIZE, this can duplicate IDs and corrupt benchmark counts. Please make the insert atomic/idempotent or return the committed prefix as non-retryable before setting thread_safe=True, and add an exact-row-count concurrency regression test.
There was a problem hiding this comment.
vectordb_bench/backend/clients/lancedb/lancedb.py line:37 Medium ---- Enabling shared concurrent writes exposes the existing multi-fragment retry path:
insert_embeddings()can commit an earlierLANCEDB_BATCH_SIZEchunk, fail on a latertable.add(), return(0, error), andConcurrentInsertRunnerthen retries the whole batch. WithNUM_PER_BATCH > LANCEDB_BATCH_SIZE, this can duplicate IDs and corrupt benchmark counts. Please make the insert atomic/idempotent or return the committed prefix as non-retryable before settingthread_safe=True, and add an exact-row-count concurrency regression test.
Thanks for the detailed analysis — agreed this was a real risk with thread_safe=True when NUM_PER_BATCH > LANCEDB_BATCH_SIZE.
Fixed by tracking committed rows across fragment table.add() calls. If a later add fails after a prefix was already committed, we now return (inserted, PartialInsertError(...)) (non_retryable=True) instead of (0, error), so ConcurrentInsertRunner will not retry the whole batch and duplicate IDs.
Also added regression coverage for the partial-commit path, ConcurrentInsertRunner non-retry behavior, and an exact row-count check under concurrent inserts.
| Explicit options win when provided; otherwise options are derived from the | ||
| URI scheme (goosefs:// / cos:// / s3://) and environment variables. | ||
| """ | ||
| if explicit: |
There was a problem hiding this comment.
vectordb_bench/backend/clients/lancedb/config.py line:67
Low ---- This truthiness check makes an explicitly supplied empty mapping behave as “not supplied”. A REST/programmatic caller that uses storage_options={} to disable inherited settings will now pick up GOOSEFS_*/COS values from the process environment, contrary to the docstring that explicit options win. Please check explicit is not None so callers can intentionally select no options.
There was a problem hiding this comment.
vectordb_bench/backend/clients/lancedb/config.py line:67 Low ---- This truthiness check makes an explicitly supplied empty mapping behave as “not supplied”. A REST/programmatic caller that uses
storage_options={}to disable inherited settings will now pick upGOOSEFS_*/COS values from the process environment, contrary to the docstring that explicit options win. Please checkexplicit is not Noneso callers can intentionally select no options.
Thanks for catching this. Fixed in the follow-up commit: the check is now if explicit is not None:, so an explicitly supplied empty mapping (storage_options={}) disables env inheritance as documented. Also added a regression test covering this case.
4063874 to
1a73aac
Compare
…torage_options
Return PartialInsertError for already-committed fragment prefixes so
ConcurrentInsertRunner does not retry whole batches, and treat
storage_options={} as an explicit empty mapping.
1a73aac to
37f7746
Compare
Summary
Shares GooseFS/COS
storage_optionsresolution so the UI and CLI both pick upGOOSEFS_*env vars, exposesIVF_HNSW_SQ/IVF_HNSW_PQin Run Test, enables concurrent loads for LanceDB, and reuses existing icons for DBs without dedicated assets.What's added
vectordb_bench/backend/clients/lancedb/config.pyasbuild_lancedb_storage_options()/build_goosefs_storage_options()/build_cos_storage_options(); CLI (cli.py) now reuses the same path.LanceDBConfig.to_dict()resolvesstorage_optionsfrom URI + env; hidestorage_optionsviaui_hidden_configs(); skip empty optional fields (token,storage_options) with_extra_empty_skip.IVF_HNSW_SQ/IVF_HNSW_PQindbCaseConfigs.py(replace the oldHNSWalias) with corrected param visibility for IVF / PQ / HNSW groups.LanceDB.thread_safe = TruesoConcurrentInsertRunnercan usemax_workers > 1.styles.py(TencentElasticsearch, AliSQL, VectorChord, Pinot, SeekDB, VolcMySQL, Doris) to existing assets.Key improvements
goosefs://URIs in Run Test now get the sameGOOSEFS_*→storage_optionsmapping as the CLI.dbConfigSettinghonorsui_hidden_configs()and treatsNonedefaults as empty strings so optional LanceDB fields don't break the form.