spec: a roll-up recomputes on the child's update too - #40
Open
delchev wants to merge 1 commit into
Open
Conversation
1.5 states a roll-up's event set only for the counting case, and states it as create / delete. Create and delete are not the only ways a parent's set of children changes: a child changes parents by an ordinary edit of its own parent relation, and on that reading nothing recomputes - the parent that received the child does not count it and the parent that lost it goes on counting it. The proposal makes the event set a property of the construct rather than of the aggregation: create, update and delete for every op, with the affected parent on an update being the one the child names after the edit. The keyed sibling `aggregates` has been normative on exactly this since 1.1. No new syntax.
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.
Proposal
0021-rollups-recompute-on-child-update.md(proposal-first —versions/untouched).1.5 states a roll-up's event set only for the counting case, and states it as create / delete:
Create and delete are not the only ways the set of children of a parent changes. A child changes parents by an ordinary edit of its own parent relation — a task dragged to another sprint, a loan reassigned to another member. No child is created and none destroyed, so on that reading nothing recomputes: the parent that received the child does not count it, the parent that lost it goes on counting it, and both stay wrong until some unrelated child of the same parent happens to be created or deleted.
The proposal makes the event set a property of the construct rather than of the aggregation — create, update and delete for every
op— with the affected parent on an update being the one the child names after the edit, and the vacated parent left to a moved-key event where a generator publishes one.aggregates, the keyed sibling, has been normative on exactly this since 1.1.No new syntax. The
Specification textsection carries the replacement opening sentence and the new normative paragraph, at therollupsanchor.Implementation: eclipse-dirigible/dirigible#6820.
🤖 Generated with Claude Code