Skip to content

chore: dep updates#299

Merged
shikhar merged 1 commit intomainfrom
depupgrades-mar5
Mar 5, 2026
Merged

chore: dep updates#299
shikhar merged 1 commit intomainfrom
depupgrades-mar5

Conversation

@shikhar
Copy link
Member

@shikhar shikhar commented Mar 5, 2026

No description provided.

@shikhar shikhar force-pushed the depupgrades-mar5 branch from 686e9b9 to b6ef100 Compare March 5, 2026 19:53
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 5, 2026

Greptile Summary

This PR performs routine dependency updates across the workspace (tokio 1.49→1.50, slatedb 0.11.0→0.11.1, various AWS SDK crates, getrandom, winnow, etc.) and bundles in a meaningful improvement to the benchmark tool: the catchup read phase now responds to Ctrl+C instead of blocking until it naturally finishes or times out.

Key changes:

  • Dependency bumps (Cargo.toml, Cargo.lock): tokio, slatedb, AWS SDK crates, getrandom, winnow, and several transitive dependencies are incremented; ring is replaced by sha1 in aws-config's dependency tree (lighter hashing dependency).
  • Bench cancellation (cli/src/bench.rs): New DelayOutcome/CatchupOutcome<T> enums and wait_or_cancel/timeout_or_cancel helpers cleanly abstract the three-way race between a result, a timeout, and a cancel signal. The run function now exits gracefully on Ctrl+C during both the pre-catchup delay and the catchup read loop. All four helper code-paths are covered by unit tests.
  • Cosmetic reformatting (lite/Cargo.toml, sdk/Cargo.toml): Multi-line feature lists collapsed to single lines; no functional changes.

Confidence Score: 4/5

  • PR is safe to merge; dependency bumps are minor/patch-level and the bench.rs logic is well-tested with only a very minor signal-handling style concern.
  • All dependency updates are minor or patch-level releases with no breaking changes. The bench.rs additions are non-critical (bench tooling only), well-structured, and covered by unit tests. The single style concern — re-registering ctrl_c() on every loop iteration — introduces a theoretically narrow race window but is practically harmless for a bench tool.
  • cli/src/bench.rs — minor signal-handling style concern with ctrl_c() re-registration in the catchup loop.

Important Files Changed

Filename Overview
Cargo.lock Routine dependency version bumps: tokio 1.49→1.50, slatedb 0.11.0→0.11.1, aws-config/sigv4/runtime/sdk minor bumps, getrandom 0.4.1→0.4.2, winnow 0.7.14→0.7.15, and several transitive windows-sys version adjustments. Also replaces ring with sha1 in aws-config's dependency tree (lighter hashing dep).
Cargo.toml Single version constraint bump: tokio workspace dep updated from 1.49 to 1.50, matching the lock file update.
cli/src/bench.rs Adds Ctrl+C cancellation support to the bench run's catchup phase via new DelayOutcome/CatchupOutcome enums and wait_or_cancel/timeout_or_cancel helpers. tokio::signal::ctrl_c() is called fresh on every loop iteration, which has a narrow race window where a signal could be missed; a pinned, reused future would be more robust. Unit tests added for all helper paths.
lite/Cargo.toml Cosmetic only: tower-http feature list reformatted from multi-line to a single line. No functional change.
sdk/Cargo.toml Cosmetic only: hyper-rustls and hyper-util feature lists reformatted from multi-line to single line. No functional change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[bench run starts] --> B[write phase]
    B --> C[live read phase]
    C --> D["wait_or_cancel(catchup_delay, ctrl_c)"]
    D -->|DelayOutcome::Elapsed| E[setup catchup stream]
    D -->|DelayOutcome::Cancelled| Z[return Ok - graceful exit]
    E --> F["loop: timeout_or_cancel(deadline, stream.next(), ctrl_c)"]
    F -->|CatchupOutcome::Item Some Ok| G[update progress bar]
    G --> F
    F -->|CatchupOutcome::Item Some Err| H[return Err]
    F -->|CatchupOutcome::Item None| I[break - stream exhausted]
    F -->|CatchupOutcome::TimedOut| J[return Err - timed out after 5m]
    F -->|CatchupOutcome::Cancelled| Z
    I --> K[print catchup stats]
    K --> L[verify chain hash]
    L --> M[print latency stats]
Loading

Comments Outside Diff (1)

  1. cli/src/bench.rs, line 708-714 (link)

    ctrl_c() re-registered on every loop iteration

    tokio::signal::ctrl_c() creates a new signal listener each iteration. If Ctrl+C is received in the narrow window between when the previous listener is dropped and the next one is registered, the signal will be missed and the loop will continue rather than cancelling.

    The more robust pattern is to create the signal future once and reuse it with tokio::pin!:

    let ctrl_c = tokio::signal::ctrl_c();
    tokio::pin!(ctrl_c);
    
    // Before the loop — pass &mut ctrl_c
    if wait_or_cancel(catchup_delay, &mut ctrl_c).await == DelayOutcome::Cancelled {
        return Ok(());
    }
    
    // ...
    
    loop {
        match timeout_or_cancel(
            catchup_deadline,
            catchup_stream.next(),
            &mut ctrl_c,   // reuse the same listener
        )
        .await
        { ... }
    }

    This requires the helper functions to accept F: Future + Unpin (or a pinned reference), but eliminates the race window entirely. For a bench tool the risk is admittedly tiny, but the fix is straightforward.

Last reviewed commit: b6ef100

@shikhar shikhar merged commit b11c750 into main Mar 5, 2026
16 checks passed
@shikhar shikhar deleted the depupgrades-mar5 branch March 5, 2026 20:05
@s2-release-plz s2-release-plz bot mentioned this pull request Mar 5, 2026
shikhar pushed a commit that referenced this pull request Mar 6, 2026
## 🤖 New release

* `s2-lite`: 0.29.19 -> 0.29.20 (✓ API compatible changes)
* `s2-sdk`: 0.24.6 -> 0.24.7 (✓ API compatible changes)
* `s2-cli`: 0.29.19 -> 0.29.20

<details><summary><i><b>Changelog</b></i></summary><p>

## `s2-lite`

<blockquote>

## [0.29.20] - 2026-03-06

### Features

- Default append pipelining with durability-gated acks
([#289](#289))

### Bug Fixes

- Keep follow sessions alive across dormancy
([#301](#301))

### Miscellaneous Tasks

- Dep updates ([#299](#299))

<!-- generated by git-cliff -->
</blockquote>

## `s2-sdk`

<blockquote>

## [0.24.7] - 2026-03-06

### Miscellaneous Tasks

- Dep updates ([#299](#299))

<!-- generated by git-cliff -->
</blockquote>

## `s2-cli`

<blockquote>

## [0.29.20] - 2026-03-06

### Bug Fixes

- Handle Ctrl+C during bench catchup
([#297](#297))

<!-- generated by git-cliff -->
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: s2-release-plz[bot] <262023388+s2-release-plz[bot]@users.noreply.github.com>
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.

1 participant