bug: merge_insert does not detect concurrent inserts of the same FixedSizeBinary primary key
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 84/100
Direzione di ricerca
Inizia con extract_key_value in rust/lance-table/src/format/key_existence.rs e confronta la gestione di FixedSizeBinary con quella di Binary e LargeBinary. Riproduci il problema usando lo schema del test di concorrenza in merge_insert/tests/concurrency.rs, quindi conferma che gli inserimenti simultanei della stessa chiave di dimensione fissa producono un conflitto che può essere ritentato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
A declared primary key of type FixedSizeBinary (for example a 32-byte content hash) is never added to a merge_insert's inserted_rows_filter. Two writers that insert the same new key against one version therefore both commit, and the key ends up duplicated. Binary and LargeBinary keys are detected correctly.
Root cause: extract_key_value in rust/lance-table/src/format/key_existence.rs has no FixedSizeBinary arm and falls through to _ => return None. The key is skipped, the transaction carries an empty Bloom filter, and check_update_txn in the conflict resolver finds no intersection. This happens on both the indexed path (after #10606) and the v2 path, because both build the filter through this function.
Mapping the type to KeyValue::Binary, as Binary and LargeBinary already are, fixes it. I have a patch with tests and can open a PR if that's welcome.
Steps to reproduce
This reproduces on main at 9b311133d and on v15.0.0-beta.12. Test, in the style of merge_insert/tests/concurrency.rs:
// schema: id FixedSizeBinary(32) with lance-schema:unenforced-primary-key=true, value UInt32
// 1. create a dataset with key [1; 32]; optionally create a BTree index on id
// 2. from the same dataset version, stage two merge_inserts of key [5; 32]
// (when_matched DoNothing, when_not_matched InsertAll) via execute_uncommitted_batches
// 3. commit the first staged transaction, then the second with CommitBuilder
// 4. the second commit succeeds and the dataset holds two rows with key [5; 32]
The same test with id declared as Binary gets a retryable conflict on the second commit, as expected.
Expected behavior
The second commit is refused with a retryable conflict, the same as for Binary, Utf8 and integer keys.
Lance version
15.0.0-beta.12; also main at 9b311133d
Language binding
Rust
Environment
macOS (arm64), local filesystem and memory://
- Lingua principale
- Rust
- Stelle
- 7.3k
- Fork
- 924
- Merge medio
- 3g 12h
- PR unite (30g)
- 539
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di lance-format/lance
-
bug: test_ann flakes because its IVF fixture leaves partitions with fewer than k rowsForse già presa @lance-gatefixer l’ha presa 3 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
lance-format/lance#10782 ·
I maintainer di solito rispondono entro 2 giorni
-
docs: approx_mode docs say it only affects RQ indexesForse già presa @LuciferYang l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
lance-format/lance#10745 ·
I maintainer di solito rispondono entro 2 giorni
-
(feat): expose set_capacity of the cache to the session APIForse già presa @hello-peter-tang l’ha presa 6 giorni fa. Apertafeature performance
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
lance-format/lance#10137 ·
I maintainer di solito rispondono entro 2 giorni
-
Upgrade DataFusion for the unparser stack-overflow fixForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
lance-format/lance#8225 ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
lance-format/lance#6425 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di lance-format/lance
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
aosama/astronomical#1973 ·
I maintainer di solito rispondono entro 1 giorno
-
bug triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 6 giorni
-
complexity: high external-contributors test
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Meet-hybrid/soroban-forge#584 ·
I maintainer di solito rispondono entro 1 giorno
-
app bug pets
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
dekobon/big-code-analysis#1859 ·
I maintainer di solito rispondono entro 1 giorno