Write data, deletion and index files with If-None-Match: *, so a store can refuse overwriting a committed file
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start in rust/lance-io/src/object_writer.rs at the store.put call for data files; switch to put_opts with PutMode::Create. Read docs/src/format/table/blob.md for the immutability rule and object_store's PutMode docs. Done means new files use conditional writes and a moto test shows a 412 when the key exists.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
A Lance table's committed files must not change while a protected snapshot references them (docs/src/format/table/blob.md, "Published Lance-owned payloads must remain immutable while protected snapshots reference them"). Lance relies on that and checks nothing: the manifest records a file's size and no content hash (DataFile.file_size_bytes, IndexFile.size_bytes).
A catalog that vends a scoped credential to a writer (the namespace spec's DescribeTable / DeclareTable vending) must grant PutObject on data/, _deletions/ and _indices/, and an IAM or session policy cannot tell a put that creates a key from one that replaces it. So any holder of a write credential can replace a committed file. Measured on pylance 13.0.0: a replacement of a different size breaks every read, and one of the same size is served silently.
S3 and S3-compatible stores can refuse it when the writer cooperates: a put naming If-None-Match: * over an existing key answers 412, and a bucket policy can require the header (s3:if-none-match, with the s3:ObjectCreationOperation exemption for multipart parts; AWS user guide, "Enforce conditional writes"). Lance sends the header only on _versions/*.manifest (measured against moto with pylance 13.0.0). Data files go through an unconditional put (rust/lance-io/src/object_writer.rs, store.put) or a multipart upload, so requiring the header would refuse every Lance write.
Proposal
- Write every new data file, blob sidecar, deletion file and index file with
PutMode::Create(put_opts), since each name is minted fresh and a collision is a bug. - Complete a multipart upload conditionally once object_store supports it (apache/arrow-rs-object-store#289, #863).
- Optionally expose a flag that refuses to write without the condition, so a deployment can rely on it.
With this, a store policy denying any put without If-None-Match makes overwriting a committed file impossible for every writer, the store arbitrating as it already does for manifests.
Context
Downstream we detect it instead: the catalog records each added file's ETag and size at commit, and a sweep re-reads them. That catches an overwrite after it happens; the condition above would prevent it.
- Lingua principale
- Rust
- Stelle
- 7.3k
- Fork
- 929
- Merge medio
- 2g 22h
- PR unite (30g)
- 572
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(python): read_transaction raises TypeError on a Rewrite with rewritten indicesForse già presa @Borg93 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
lance-format/lance#11117 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
lance-format/lance#10782 ·
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
-
Expose compute_pq_distanceForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertaenhancement
Difficoltà 1/5 1-3 ore Idoneità per principianti 62/100
lance-format/lance#5675 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di lance-format/lance
Issue simili
-
comp-rbac
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ClickHouse/ClickHouse#131875 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
storytold/photocraft#15232 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
forge: fork preflight reads still send `requireCanonical: false`, which Rootstock rejects (-32603)Forse già presa @Ynyesto l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
foundry-rs/foundry#18485 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
bondybondbond/rushcut#238 · 1 commento ·
-
area: app type: bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno