Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bifrost] Allow top-level find_tail to auto-retry #2649

Merged
merged 4 commits into from
Feb 6, 2025
Merged

Conversation

AhmedSoliman
Copy link
Contributor

@AhmedSoliman AhmedSoliman commented Feb 6, 2025

Those find_tail operations are only used by the partition_processor on startup and we don't want it to fail unnecessarily, this gives it a good chance to succeed unless the underlying error is not retryable.

// intentionally empty

Stack created with Sapling. Best reviewed with ReviewStack.

Copy link

github-actions bot commented Feb 6, 2025

Test Results

  7 files  ±0    7 suites  ±0   2m 43s ⏱️ -52s
 45 tests ±0   44 ✅ ±0  1 💤 ±0  0 ❌ ±0 
172 runs   - 2  169 ✅  - 2  3 💤 ±0  0 ❌ ±0 

Results for commit bc16992. ± Comparison against base commit d730f92.

This pull request removes 2 and adds 2 tests. Note that renamed tests count towards both.
dev.restate.sdktesting.tests.RunRetry ‑ withExhaustedAttempts(Client)
dev.restate.sdktesting.tests.RunRetry ‑ withSuccess(Client)
dev.restate.sdktesting.tests.AwaitTimeout ‑ timeout(Client)
dev.restate.sdktesting.tests.RawHandler ‑ rawHandler(Client)

Copy link

github-actions bot commented Feb 6, 2025

Test Results

  7 files  ±0    7 suites  ±0   4m 20s ⏱️ +45s
 47 tests +2   46 ✅ +2  1 💤 ±0  0 ❌ ±0 
182 runs  +8  179 ✅ +8  3 💤 ±0  0 ❌ ±0 

Results for commit bc16992. ± Comparison against base commit d730f92.

♻️ 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.

LGTM. +1 for merging.

Comment on lines 28 to 29
// #[error("log '{0}' is sealed")]
// LogSealed(LogId),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be removed?

Previously, setting target nodeset size with restatectl would tell you that "No change"
```
// intentionally empty
```
The PR also uses it in CheckSeal. This utility `DecoratedNodeSet` can be used when you want to add a nugget of information next to every node. It prints the nodeset sorted as well.
```
// intentionally empty
```
Key changes:
- Using JoinSet instead of unordered futures to perform store tasks to avoid some of its tricky lockup scenarios
- Store tasks are free to use whatever connection is available, this over-indexes over the current design that serializes all writes in a one-at-a-time fashion, but removes a lock, and simplifies the logic.
- Extra in-flight stores are aborted after an append is complete to avoid overloading
- Timeout store tasks only on the basis of their network operation and not on the time they're waiting for the tail to move
- Cache nodeset checker across waves
- Better logging on failures, it reports the nodeset status with the number of attempts per node
- Adds a new metric to latency of appends

Performance testing shows no regression and reliability testing appears to show no regression even in tricky failure scenarios.

```
// intentionally empty
```
Those find_tail operations are only used by the partition_processor on startup and we don't want it to fail unnecessarily, this gives it a good chance to succeed unless the underlying error is not retryable.
```
// intentionally empty
```
@AhmedSoliman AhmedSoliman merged commit fa15440 into main Feb 6, 2025
14 checks passed
@AhmedSoliman AhmedSoliman deleted the pr2649 branch February 6, 2025 19:48
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.

2 participants