[raft/scd] Derive implicit subscription ID deterministically - #1656
Open
MariemBaccari wants to merge 13 commits into
Open
[raft/scd] Derive implicit subscription ID deterministically#1656MariemBaccari wants to merge 13 commits into
MariemBaccari wants to merge 13 commits into
Conversation
This was referenced Aug 20, 2026
MariemBaccari
force-pushed
the
scd_deterministic_implicit_sub
branch
3 times, most recently
from
August 20, 2026 14:05
4db755d to
5ff0dfc
Compare
MariemBaccari
marked this pull request as ready for review
August 20, 2026 14:15
MariemBaccari
force-pushed
the
scd_deterministic_implicit_sub
branch
2 times, most recently
from
August 20, 2026 15:30
475f91b to
7b88375
Compare
MariemBaccari
marked this pull request as draft
August 21, 2026 06:31
MariemBaccari
force-pushed
the
scd_deterministic_implicit_sub
branch
from
August 21, 2026 06:34
7b88375 to
1e57680
Compare
MariemBaccari
marked this pull request as ready for review
August 21, 2026 06:42
MariemBaccari
marked this pull request as draft
August 21, 2026 08:14
MariemBaccari
marked this pull request as ready for review
August 21, 2026 08:24
This was referenced Aug 28, 2026
MariemBaccari
force-pushed
the
scd_deterministic_implicit_sub
branch
from
August 28, 2026 10:10
1e57680 to
293b561
Compare
This was referenced Aug 28, 2026
mickmis
reviewed
Aug 31, 2026
mickmis
left a comment
Contributor
There was a problem hiding this comment.
(293b561)
- this UUID is presenting itself as an UUIDv4 but it is actually not: see RFC, this should be random
- I think with the deterministic intent, what should be implemented here would be a v5 (or a v7 with a stretch)
- the OpenAPI does specifically mention the UUID should be a v4 (although I'm not sure how hard of a requirement that is as long as it is a UUID - but that would require to be discussed in the InterUSS weekly)
- I don't think the actualization of the 'now' at each retry is a good idea (in general we should be careful with stuff we put in the context)
The business logic does require us to generate (pseudo-)random data, but we need determinism across nodes. To solve this, have you considered the alternative of (generically) propagating a seed value through the Raft messages? That way all nodes will be able to deterministically generate (pseudo-)random values. I suspect we may encounter this problem again actually?
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.
Chained PR: #1627 -> #1642 -> #1643 -> #1644 -> #1645 -> #1646 -> #1649 -> #1650 -> #1651 -> #1653 -> #1654 -> #1656 -> #1657 -> #1655 -> #1666 -> #1667 -> #1668 -> #1669
upsertOperationalIntentReference's transaction creates a new random UUID when an implicit subscription is requested. However, this wouldn't execute deterministically across Raft nodes and entry replays.There are two directions to solve this:
parametersmap field to theProposalstruct where each operation can pass its parameters and then passing the parameters in the context as we do for the timestamp and locality to propagate them to business logic. However, this solution is not very elegant and would actually only be used once by this case.