Skip to content

[raft/scd] Derive implicit subscription ID deterministically - #1656

Open
MariemBaccari wants to merge 13 commits into
interuss:masterfrom
Orbitalize:scd_deterministic_implicit_sub
Open

[raft/scd] Derive implicit subscription ID deterministically#1656
MariemBaccari wants to merge 13 commits into
interuss:masterfrom
Orbitalize:scd_deterministic_implicit_sub

Conversation

@MariemBaccari

@MariemBaccari MariemBaccari commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

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:

  • Pre-computing the UUID at the handler level, adding a parameters map field to the Proposal struct 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.
  • The solution that this PR goes with: Deterministically generating the subscription ID using the query timestamp and the opintent ID.

@MariemBaccari
MariemBaccari force-pushed the scd_deterministic_implicit_sub branch 3 times, most recently from 4db755d to 5ff0dfc Compare August 20, 2026 14:05
@MariemBaccari
MariemBaccari marked this pull request as ready for review August 20, 2026 14:15
@MariemBaccari
MariemBaccari force-pushed the scd_deterministic_implicit_sub branch 2 times, most recently from 475f91b to 7b88375 Compare August 20, 2026 15:30
@barroco barroco added the dss-raft Relating to the application-layer consensus implemenation based on raft label Aug 20, 2026
@MariemBaccari
MariemBaccari marked this pull request as draft August 21, 2026 06:31
@MariemBaccari
MariemBaccari force-pushed the scd_deterministic_implicit_sub branch from 7b88375 to 1e57680 Compare August 21, 2026 06:34
@MariemBaccari
MariemBaccari marked this pull request as ready for review August 21, 2026 06:42
@MariemBaccari
MariemBaccari marked this pull request as draft August 21, 2026 08:14
@MariemBaccari
MariemBaccari marked this pull request as ready for review August 21, 2026 08:24

@mickmis mickmis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dss-raft Relating to the application-layer consensus implemenation based on raft

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants