Rebase: a field update of a row deleted in the database is dropped without any record; and the conflicts file is per project, not per connection
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start by tracing pull() and the rebase handling described in the issue, especially _handle_delete, then inspect how conflict and base2our/base2their filenames are built. Reproduce the delete-versus-update case and a cycle with multiple connections. Done means lost field updates are recorded and each connection's conflict and rebase files retain distinct names.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
We ran the concurrent-edit cases of a two-way setup (db-sync 2.4.0,
geodiff 2.3.0, PostgreSQL driver, one GeoPackage, edits in the database
by SQL and in the field through the QGIS plugin, the daemon paused to
create the window). Outcomes:
| database | field | result | record |
|---|---|---|---|
| update column B | update column A, same row | both values on both sides | — |
| update value D | update same column, value F | D on both sides (the database syncs last and wins) | conflicts file, old = F, new = D |
| update row | delete row | row gone on both sides, the update dropped | conflicts file (entry without old) |
| delete row | update row | row gone on both sides, the field's update lost | nothing |
Two things we would like to change:
-
The last case leaves no record.
geodiff rebase-dbkeeps our
delete over their update (consistent with "a delete wins", fine) but
writes nothing to the conflicts file for it, so the field crew's edit
disappears without a trace: not in the database, not in the file, not
in the log. The information is available inpull()before the
rebase:base2our(computed beforemc.pull_project) holds our
delete,base2their(computed after) holds their update. Matching the
two by row key and logging one WARNING per lost update is a small
change in db-sync; PR follows. Recording it in the conflicts file
instead would be a geodiff change (the rebase's_handle_delete
records only the opposite direction), which we can propose there if
you prefer. -
The conflicts file is named per project:
<tmp>/<project name>-dbsync-pull-conflicts. With several connections
(several GeoPackages of one project, which 2.4.0 supports with one
working directory per connection), a second rebase in the same cycle
overwrites the first connection's file before anyone can read it.
Naming it<project name>-<modified schema>-dbsync-pull-conflicts,
like the working directory, keeps every connection's record. We read
these files (dbsync-manager keeps them and shows them per project), so
the name matters to us; the same goes for-dbsync-pull-base2our/
-base2their.
- Lingua principale
- Python
- Stelle
- 55
- Fork
- 25
- Merge medio
- 3g 22h
- PR unite (30g)
- 1
Preparare l'ambiente
- 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 MerginMaps/db-sync
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
MerginMaps/db-sync#184 ·
-
SIGTERM kills db-sync mid-pull; proposal: finish the current connection and exit between cyclesForse già presa @NicklasBlidmo l’ha presa 23 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
MerginMaps/db-sync#193 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
MerginMaps/db-sync#185 · 1 commento ·
-
db-sync enters an infinite drop/recreate loop when geodiff init fails on invalid source geometriesAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
MerginMaps/db-sync#182 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
MerginMaps/db-sync#181 · 2 commenti ·
Tutte le issue di MerginMaps/db-sync
Issue simili
-
Invalid syntax in sshtunnelApertaBug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
pgadmin-org/pgadmin4#10797 ·
I maintainer di solito rispondono entro 2 giorni
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
ida-arbeitszeit/workers-control#1588 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
aws-samples/sample-per-model-bedrock#930 ·
I maintainer di solito rispondono entro 1 giorno
-
Locus / Transcript lacks __bool__, so bool(transcript) queries the SQLite exon table via __len__Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Deltares/numba_celltree#100 · 1 commento ·