feat: WAL provider support#100
Draft
danielgerlag wants to merge 2 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
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-redbinto instance construction paths (server startup + create-instance API). - Adds
drasi-wal-redbdependency and updates lockfile. - Enables local
drasi-corepath patches via[patch.crates-io]inCargo.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 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 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)); |
Contributor
Author
|
@copilot resolve the merge conflicts in this pull request |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds WAL (Write-Ahead Log) provider integration using redb-based WAL from drasi-core.