Repository navigation
feat: log seeder shutdown timings for deploy measurement - #729
Merged
Merged
Conversation
The seeder's JSON log now carries an absolute `at` on `ws` and `ready`, and a `stopped` event at shutdown with drainMs, closeMs (or fatal: true after a self-close) and stopListeningAt (only with --ws-port). One production deploy then gives the close time and the time the WebSocket port was dark, which decides whether the standby handoff is needed. No behaviour change: shutdown order and exit codes are unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
O que muda e por quê
Primeira etapa da fase B (implantação do semeador sem porta escura): só medição, sem mudança de comportamento.
wsereadydo log JSON deseedganhamat(instante absoluto em ms desde 1970);stoppedtrazdrainMs(do sinal ao fim do drain do WebSocket),closeMs(do sinal ao armazenamento fechado;fatal: trueno lugar dele depois de um fechamento fatal) estopListeningAt(só com--ws-port);--json, o desligamento imprime a linhastopped.Com uma implantação em produção: tempo de fechamento C =
closeMsdo processo antigo; porta sem escuta =ws.atdo novo menosstopListeningAtdo antigo. Esses números decidem se as etapas seguintes (semeador reserva no mesmo diretório) são necessárias.Limites conhecidos (detalhes em
docs/verification/feat-seeder-shutdown-timing.md): uma implantação não é uma distribuição; a porta escura precisa dos logs dos dois contêineres; um SIGTERM antes deseed readysuperestima C; o caminho fatal não tem teste próprio.Issue
Closes # (não há issue aberta para este problema)
Como verificar
Checklist
npm run lint,npm test(ounpm test -- --affected=origin/main) enpm run demopassamdocs/changelog/<branch>.mde verificação emdocs/verification/<branch>.md, se houver, sem editar o CHANGELOG.md nem acrescentar seção ao docs/verification.md