Skip to content

Conversation

@infiniteregrets
Copy link
Member

Summary

Use db.get() approach until slatedb releases with db.status() method.

Blocked by: slatedb/slatedb#1234

Once slatedb releases, we can switch back to self.db.status().

Test plan

  • cargo check -p s2-lite passes
  • Merge and re-trigger release

🤖 Generated with Claude Code

Use db.get() approach until slatedb releases with db.status() method.
See: slatedb/slatedb#1234

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@infiniteregrets infiniteregrets merged commit c889704 into main Jan 29, 2026
6 checks passed
@infiniteregrets infiniteregrets deleted the fix/temp-db-status-workaround branch January 29, 2026 01:07
@greptile-apps
Copy link

greptile-apps bot commented Jan 29, 2026

Greptile Overview

Greptile Summary

Changed the db_status() method from synchronous to asynchronous and replaced the direct self.db.status() call with self.db.get(b"ping").await as a temporary workaround until slatedb releases the status() method in slatedb/slatedb#1234.

Changes:

  • Made db_status() async in lite/src/backend/store.rs:14
  • Updated health endpoint to await the async call in lite/src/handlers/mod.rs:20
  • Added TODO comment with reference to upstream slatedb PR

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are minimal, well-documented with a TODO comment, and use a reasonable workaround pattern (checking database connectivity via get operation). The async transformation is handled correctly with proper await syntax.
  • No files require special attention

Important Files Changed

Filename Overview
lite/src/backend/store.rs Changed db_status() from synchronous to async, using db.get(b"ping") as temporary workaround for missing status() method
lite/src/handlers/mod.rs Updated health endpoint to await the now-async db_status() call

Sequence Diagram

sequenceDiagram
    participant Client
    participant Handler as health() handler
    participant Backend
    participant SlateDB as SlateDB

    Client->>Handler: GET /health or /ping
    Handler->>Backend: backend.db_status().await
    Backend->>SlateDB: db.get(b"ping").await
    Note over Backend,SlateDB: Temporary workaround<br/>until status() method available
    SlateDB-->>Backend: Result<Option<Value>, Error>
    Backend-->>Handler: Result<(), Error>
    alt Success
        Handler-->>Client: 200 OK
    else Error
        Handler-->>Client: 503 SERVICE_UNAVAILABLE
    end
Loading

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