Skip to content

feat: WAL provider support#100

Draft
danielgerlag wants to merge 2 commits into
mainfrom
wal-provider-pr
Draft

feat: WAL provider support#100
danielgerlag wants to merge 2 commits into
mainfrom
wal-provider-pr

Conversation

@danielgerlag
Copy link
Copy Markdown
Contributor

Adds WAL (Write-Ahead Log) provider integration using redb-based WAL from drasi-core.

Copilot AI review requested due to automatic review settings May 20, 2026 21:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds integration of a REDB-based WAL (write-ahead log) provider from drasi-core so instances can persist source events durably.

Changes:

  • Wires drasi-wal-redb into instance construction paths (server startup + create-instance API).
  • Adds drasi-wal-redb dependency and updates lockfile.
  • Enables local drasi-core path patches via [patch.crates-io] in Cargo.toml.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/server.rs Adds WAL provider initialization during server instance bootstrap.
src/api/shared/handlers/instance_handlers.rs Adds WAL provider initialization when creating instances via API.
Cargo.toml Adds drasi-wal-redb dependency and enables [patch.crates-io] path overrides.
Cargo.lock Records the new drasi-wal-redb package and dependency edge.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Cargo.toml Outdated
Comment on lines +159 to +171
# Local development: use path-based dependencies
# [patch.crates-io]
# drasi-core = { path = "../drasi-core/core" }
# drasi-lib = { path = "../drasi-core/lib" }
# drasi-bootstrap-noop = { path = "../drasi-core/components/bootstrappers/noop" }
# drasi-bootstrap-application = { path = "../drasi-core/components/bootstrappers/application" }
# drasi-reaction-application = { path = "../drasi-core/components/reactions/application" }
# drasi-index-rocksdb = { path = "../drasi-core/components/indexes/rocksdb" }
# drasi-index-garnet = { path = "../drasi-core/components/indexes/garnet" }
# drasi-state-store-redb = { path = "../drasi-core/components/state_stores/redb" }
# drasi-plugin-sdk = { path = "../drasi-core/components/plugin-sdk" }
# drasi-host-sdk = { path = "../drasi-core/components/host-sdk" }
[patch.crates-io]
drasi-core = { path = "../drasi-core/core" }
drasi-lib = { path = "../drasi-core/lib" }
drasi-bootstrap-noop = { path = "../drasi-core/components/bootstrappers/noop" }
drasi-bootstrap-application = { path = "../drasi-core/components/bootstrappers/application" }
drasi-reaction-application = { path = "../drasi-core/components/reactions/application" }
drasi-index-rocksdb = { path = "../drasi-core/components/indexes/rocksdb" }
drasi-index-garnet = { path = "../drasi-core/components/indexes/garnet" }
drasi-state-store-redb = { path = "../drasi-core/components/state_stores/redb" }
drasi-wal-redb = { path = "../drasi-core/components/wals/redb" }
drasi-plugin-sdk = { path = "../drasi-core/components/plugin-sdk" }
drasi-host-sdk = { path = "../drasi-core/components/host-sdk" }
Comment thread src/server.rs
Comment on lines +426 to +430
// Create WAL provider for durable source event persistence
{
let safe_id = instance.id.replace(['/', '\\'], "_").replace("..", "_");
let wal_path = PathBuf::from(format!("./data/{safe_id}/wal"));
info!(
Comment on lines +107 to +111
// WAL provider for durable source event persistence
{
let safe_id = instance_id.replace(['/', '\\'], "_").replace("..", "_");
let wal_path = std::path::PathBuf::from(format!("./data/{safe_id}/wal"));
let wal_provider = Arc::new(drasi_wal_redb::RedbWalProvider::new(&wal_path));
@danielgerlag
Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 2, 2026

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts and pushed the fix in 6e33375.

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.

4 participants