import_ovpack(on_conflict="overwrite") deletes the existing resource before writing, so a failed import loses both versions
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 20/100
Direzione di ricerca
Read openviking/storage/ovpack/operations.py, especially _remove_existing_root() and the import_ovpack() member-writing loop. PR #7421 describes the proposed backup and restore behavior, and the issue says two regression tests fail on main; inspect those tests and verify that a failed member write preserves the old resource. The issue already has an open pull request.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
import_ovpack(..., on_conflict="overwrite") deletes the existing root before writing the package
Bug Description
import_ovpack() (openviking/storage/ovpack/operations.py:263) handles overwrite by calling _remove_existing_root() (operations.py:127) for every existing root and only then iterating the package members with mkdir / write_file_bytes (operations.py:343-368). The delete is not reversible and the member loop is not transactional.
Any failure during the member loop — a storage timeout, a full disk, an ACL error, process cancellation — leaves the destination with the new files partially written and the previous resource permanently deleted. The function raises, but neither the old nor the new version is intact.
Steps to Reproduce
- Import a pack at
viking://resources/demo, producinga.txtandb.txt. - Import a second pack for the same root with
on_conflict="overwrite". - Make
write_file_bytesfail for one member (e.g.b.txt) mid-import.
Expected Behavior
The failed import leaves the previous resource at viking://resources/demo intact, so the caller can retry.
Actual Behavior
The previous root was deleted before the member writes; the destination holds a partially written new root, and the previous a.txt / b.txt are gone.
Environment
- OS: Windows 11
- OpenViking version/commit: main @
95d96162
Additional Context
Fix submitted as PR #7421: the existing root is moved to <root>.ovpack-backup-<uuid> before writing, restored if the member loop fails, and discarded after a successful write. Filesystems without mv keep the previous delete-then-write behavior. Two regression tests fail on unmodified main.
- Lingua principale
- Python
- Stelle
- 41.8k
- Fork
- 3.4k
- Merge medio
- 19h 29m
- PR unite (30g)
- 500
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un 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 volcengine/OpenViking
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
volcengine/OpenViking#7485 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
volcengine/OpenViking#7210 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
volcengine/OpenViking#7205 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Retrieval rerank fallback statistics stay zero after provider failureForse già presa @97Three l’ha presa 8 giorni fa. Apertabug kernel
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
volcengine/OpenViking#7014 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: memory.prefetch_search_topn is inert above 5 (call site omits limit), plus two docstrings state the wrong defaultsForse già presa @peterzhang987723 l’ha presa 8 giorni fa. Apertakernel
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
volcengine/OpenViking#6923 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di volcengine/OpenViking
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
FinanceFlash/unvibecode#699 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement Website
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OWASP/OWASP-Hunting#96 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
micropython/micropython#19942 ·
I maintainer di solito rispondono entro 1 giorno
-
A rebuild posts "not part of this build" success to the commit's failed `nix-build` gate and effectsForse già presa @Padraic-O-Mhuiris l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
`epoch.Integer` raises a raw OverflowError for integers too large to convert to a floatForse già presa @arindam77 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pydantic/pydantic-extra-types#479 ·
I maintainer di solito rispondono entro 1 giorno