Skip to content

Conversation

AhmedSoliman
Copy link
Contributor

@AhmedSoliman AhmedSoliman commented Jul 29, 2025

Copy link

github-actions bot commented Jul 29, 2025

Test Results

  7 files  ±0    7 suites  ±0   3m 48s ⏱️ - 1m 20s
 54 tests ±0   53 ✅ ±0  1 💤 ±0  0 ❌ ±0 
223 runs  ±0  220 ✅ ±0  3 💤 ±0  0 ❌ ±0 

Results for commit 8bf6dde. ± Comparison against base commit e67c936.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

Great work @AhmedSoliman. The logic seems sound to me. LGTM. +1 for merging :-)

Comment on lines 120 to 125
Reconfiguring,
/// Waiting for the tail LSN of the substream's loglet to be determined (sealing in-progress).
/// We land on this state when we observe a "Sealed" signal from an open segment after we
/// reached the safe known tail for that loglet. We can continue reading only after the chain
/// has been sealed by a marker or with a new installed chain.
AwaitingReconfiguration {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Reconfiguring (compared to AwaitingReconfiguration) reads as if the read stream would reconfigure something. Could renaming Reconfiguring into Awaiting(NewSegment | Reconfiguration) and AwaitingReconfiguration into Awaiting(NewSegment | Reconfiguration)OrSealChain be an idea?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No strong opinions here. I'll update.

The PR introduces two changes:
- `Bifrost::find_tail()` will only attempt to seal the chain if FindTailOpts asks for consistent result; we don't need to cripple the fast path for find-tail.
- Find tail will eagerly seal the chain without grace period. This is to avoid unnecessary startup delays for single-node setups.

The fact that chain sealing is idempotent makes it lighterweight to perform as it'll coalesce nicely with other reconfigurations that might be happening concurrently.
Allows the system to capture the "source" and the "node" for chain seal markers. There is also a new `--reason` flag to `restatectl log seal` to specify the reason, and the reason + the node id will be printed in `restatectl logs describe <id>` output.
A partial seal is when the tail loglet is sealed but the chain itself is not. The read stream will detect this situation and seal the chain after a grace period (5s+50% jitter).
@AhmedSoliman AhmedSoliman merged commit 200b8ad into main Jul 30, 2025
38 checks passed
@AhmedSoliman AhmedSoliman deleted the pr3597 branch July 30, 2025 14:27
@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants