SIGTERM kills db-sync mid-pull; proposal: finish the current connection and exit between cycles
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 52/100
Direção de pesquisa
Start by reading dbsync_daemon.py and tracing dbsync_pull(), dbsync_push(), and run_daemon() to understand the cycle boundaries described in the issue. Implement the proposed SIGTERM shutdown behavior, then verify that a started pull or push can finish before the process exits and that SIGINT retains its default behavior.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
dbsync_daemon.py installs no SIGTERM handler, so a docker stop,
docker compose up -d after a rebuild, or a service manager restart ends
the process wherever it happens to be. If that is inside pull() between
"GeoPackage updated" (the checkout is at the new version) and "base
schema updated" (the changeset has been applied to the database), the
checkout and the base schema are at the same version with different
content, and the next start refuses with
The db schemas already exist but 'base' schema is not synchronized with source GPKG. Running `dbsync_deamon.py` with `--force-init` should fix the issue.
--force-init then drops and rebuilds the schemas, which loses any
not-yet-pushed database edits and any views or grants on the schemas.
We hit this in production with four projects and a routine image
rebuild (one daemon was pulling 48 files at that moment).
Proposal, implemented in the PR that follows: a SIGTERM handler that only
sets a flag; dbsync_pull()/dbsync_push() check it before each
connection; run_daemon() checks it at the top of the cycle and between
pull and push; the sleep polls it once a second. A pull or push that has
started always completes; the process exits 0 at the next boundary.
SIGINT keeps its default so ctrl+c still kills immediately. A container
needs stop_grace_period long enough for one connection's pull
(we use 150 s).
- Linguagem predominante
- Python
- Estrelas
- 55
- Forks
- 25
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de MerginMaps/db-sync
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
MerginMaps/db-sync#184 ·
-
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 connectionTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
MerginMaps/db-sync#195 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 38/100
MerginMaps/db-sync#185 · 1 comentário ·
-
db-sync enters an infinite drop/recreate loop when geodiff init fails on invalid source geometriesAberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 42/100
MerginMaps/db-sync#182 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
MerginMaps/db-sync#181 · 2 comentários ·
Todas as issues de MerginMaps/db-sync
Issues semelhantes
-
bug(mcp): handle malformed and partial reranker responses safelyTalvez já em andamento @KamilEjaz890 assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
kubeflow/docs-agent#301 ·
Mantenedores costumam responder em até 4 dias
-
Update the demo docsAberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
pulp/pulp_workflow#78 ·
-
Invalid syntax in sshtunnelAbertaBug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
pgadmin-org/pgadmin4#10797 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
gcivil-nyu-org/team5-mon-fall26#132 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 76/100
gcivil-nyu-org/team4-mon-fall26#291 ·
Mantenedores costumam responder em até 1 dia