Skip to content

RSCBC-295: Drop async_trait in the SDK - #506

Open
Matt-Woz wants to merge 1 commit into
mainfrom
RSCBC-295
Open

Matt-Woz wants to merge 1 commit into
mainfrom
RSCBC-295

Conversation

@Matt-Woz

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

memdx::Dispatcher::dispatch currently uses RequestPacket without the required lifetime parameter for RequestPacket<'a>, which will fail to compile.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR removes the async-trait dependency from couchbase-core by transitioning async trait methods to return impl Future, aligning the SDK with native async-in-trait/RPITIT patterns.

Changes:

  • Removed async-trait imports/usages across retry/query/analytics components.
  • Updated memdx::Dispatcher and httpx::Client traits to use fn ... -> impl Future instead of async fn via async-trait.
  • Dropped the async-trait dependency from sdk/couchbase-core/Cargo.toml.
File summaries
File Description
sdk/couchbase-core/src/retry.rs Removes unused async-trait import as part of dependency drop.
sdk/couchbase-core/src/queryx/query_respreader.rs Removes unused async-trait import as part of dependency drop.
sdk/couchbase-core/src/memdx/dispatcher.rs Refactors Dispatcher trait away from async-trait to impl Future returns.
sdk/couchbase-core/src/memdx/client.rs Removes async-trait usage from the Dispatcher implementation site.
sdk/couchbase-core/src/httpx/client.rs Refactors HTTP client trait to return impl Future and removes async-trait.
sdk/couchbase-core/src/analyticsx/query_respreader.rs Removes unused async-trait import as part of dependency drop.
sdk/couchbase-core/Cargo.toml Removes the async-trait dependency.
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread sdk/couchbase-core/src/memdx/dispatcher.rs
@github-actions

Copy link
Copy Markdown

🐰 Bencher Report

Projectcouchbase-rs
BranchRSCBC-295-34506859750-210-1
Testbedubuntu-latest

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
upsert_and_getLatency
microseconds (µs)
📈 plot
🚷 threshold
🚨 alert (🔔)
447.54 µs
(+16.01%)Baseline: 385.79 µs
443.66 µs
(100.88%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
microseconds (µs)
(Result Δ%)
Upper Boundary
microseconds (µs)
(Limit %)
query📈 view plot
🚷 view threshold
440.85 µs
(+5.41%)Baseline: 418.22 µs
480.95 µs
(91.66%)
upsert_and_get📈 view plot
🚷 view threshold
🚨 view alert (🔔)
447.54 µs
(+16.01%)Baseline: 385.79 µs
443.66 µs
(100.88%)

🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown

🐰 Bencher Report

Projectcouchbase-rs
BranchRSCBC-295-34507982510-211-1
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
microseconds (µs)
(Result Δ%)
Upper Boundary
microseconds (µs)
(Limit %)
query📈 view plot
🚷 view threshold
335.21 µs
(-19.85%)Baseline: 418.22 µs
480.95 µs
(69.70%)
upsert_and_get📈 view plot
🚷 view threshold
184.00 µs
(-52.31%)Baseline: 385.79 µs
443.66 µs
(41.47%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown

🐰 Bencher Report

Projectcouchbase-rs
BranchRSCBC-295-34589230955-212-1
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
microseconds (µs)
(Result Δ%)
Upper Boundary
microseconds (µs)
(Limit %)
query📈 view plot
🚷 view threshold
446.55 µs
(+6.78%)Baseline: 418.22 µs
480.95 µs
(92.85%)
upsert_and_get📈 view plot
🚷 view threshold
428.21 µs
(+11.00%)Baseline: 385.79 µs
443.66 µs
(96.52%)
🐰 View full continuous benchmarking report in Bencher

This branch has not been deployed

No deployments
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