Repository navigation
fix(seeder): list a writer that left by its last on join - #721
Merged
Merged
Conversation
A counted writer whose newest join is off, and a released one, were listed with the seq of that off join. Readers check the page item's seq against an on:true group-join naming the writer, so they refused the writer as unbound and charged the seeder. The slot walk now keeps the newest on:true join of each writer it counts or released, and the listing uses it. A binding stored with the off seq takes the on seq at the diary's next scan. Readers do not change.
Conflicts: the entry comment on the group scan state in packages/core/lib/seeder.js and the "Scan" bullet of docs/protocol.md section 10. Both keep the two changes: the walk keeps the newest on:true join of each writer, and groupEvents steps a walk again when a deleted record arrives late. That re-step runs through groupWalkStep, so the on:true seqs are rebuilt with it.
A writer whose on:true join was a hole when the scan passed it, and whose off join the scan already read, is listed left by that on join once it arrives, never by the off one.
A stored binding the scan no longer lists (its diary named the writer in another group, or the group fell past the cap) kept the seq it was stored with and was still indexed, so a binding stored with an off join stayed refused as unbound. It now takes the walk's newest on:true join of the writer in its group once the scan has read it.
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.
Parte da #350.
O que muda e por quê
Desde o #713, o semeador lista um escritor de quem saiu de um grupo (entrada desligada) e um escritor liberado por um corte com a seq da entrada desligada. Os leitores (nó do app e da CLI, nó do navegador) exigem que essa seq aponte para uma entrada
on: trueque nomeia o escritor, então recusavam o escritor comounbound, não o baixavam e contavam a listagem contra o semeador.admitted.json) se corrige no próximo escaneamento do diário.docs/protocol.md(seção 3,groupsdeadmitted.json, e seção 10, "Scan") descreve a regra.Como verificar
Os testes, o que cada um cobre e o que falha sem a mudança estão em
docs/verification/fix-left-writer-listing.md.Operador: o semeador novo vai antes dos apps.
Local, com a
mainem c0f85f2:npm run lintlimpo,npm run demotermina com DEMO OK enpm test -- --affected=origin/maincom 832 arquivos e uma falha, o tempo esgotado emapps/cli/test/update.test.jssob carga; sozinho (VARANDA_TEST_CONCURRENCY=1), ele passa com 73/73 testes. Depois veio amainem 5ff127c, num merge sem conflito.Checklist
npm run lint,npm test -- --affected=origin/mainenpm run demopassamdocs/changelog/fix-left-writer-listing.mde verificação emdocs/verification/fix-left-writer-listing.md