Skip to content

Conversation

@mkysel
Copy link
Collaborator

@mkysel mkysel commented Dec 18, 2025

Remove gateway_time from SQL ordering and order gateway envelope queries by originator_node_id and originator_sequence_id in envelopes_v2.sql

Update SQL CTE ORDER BY to drop gateway_time and sort by originator_node_id, originator_sequence_id; regenerate code and add a test asserting contiguous sequences per originator.

📍Where to Start

Start with the SelectGatewayEnvelopesByOriginators and SelectGatewayEnvelopesByTopics queries in envelopes_v2.sql, then review the regenerated code in envelopes_v2.sql.go and the test in subscription_test.go.

Changes since #1468 opened

  • Updated expected row indices in TestQueryPagedEnvelopes test assertion [e266456]
  • Applied formatting change to checkRowsMatchProtos helper function [e266456]
  • Applied formatting adjustment to test helper function [2266b39]

Macroscope summarized 172b3fb.

@mkysel mkysel requested a review from a team as a code owner December 18, 2025 15:26
@mkysel
Copy link
Collaborator Author

mkysel commented Dec 18, 2025

Fixes #1421

@mkysel
Copy link
Collaborator Author

mkysel commented Dec 18, 2025

will add tests

@mkysel mkysel marked this pull request as draft December 19, 2025 18:51
@mkysel mkysel force-pushed the mkysel/remove-gateway-sorting branch from ca10589 to 172b3fb Compare January 7, 2026 16:08
@mkysel mkysel marked this pull request as ready for review January 7, 2026 16:08
@mkysel mkysel merged commit 62031ea into main Jan 7, 2026
12 checks passed
@mkysel mkysel deleted the mkysel/remove-gateway-sorting branch January 7, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SelectGatewayEnvelopesByOriginators can potentially return out of order envelopes

3 participants