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
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 55
- Forks
- 25
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de MerginMaps/db-sync
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
MerginMaps/db-sync#184 ·
-
SIGTERM kills db-sync mid-pull; proposal: finish the current connection and exit between cyclesPeut-être pris @NicklasBlidmo l’a pris il y a 23 jours. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
MerginMaps/db-sync#193 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 38/100
MerginMaps/db-sync#185 · 1 commentaire ·
-
db-sync enters an infinite drop/recreate loop when geodiff init fails on invalid source geometriesOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 42/100
MerginMaps/db-sync#182 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
MerginMaps/db-sync#181 · 2 commentaires ·
Toutes les issues de MerginMaps/db-sync
Issues similaires
-
bug(mcp): handle malformed and partial reranker responses safelyPeut-être pris @KamilEjaz890 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
kubeflow/docs-agent#301 ·
Les mainteneurs répondent en général sous 4 jours
-
Update the demo docsOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
pulp/pulp_workflow#78 ·
-
Invalid syntax in sshtunnelOuverteBug
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
pgadmin-org/pgadmin4#10797 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
gcivil-nyu-org/team5-mon-fall26#132 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 76/100
gcivil-nyu-org/team4-mon-fall26#291 ·
Les mainteneurs répondent en général sous 1 jour