Skip to content

Commit

Permalink
[LogServer] Initial implementation for store path
Browse files Browse the repository at this point in the history
Note 1: This PR contains many todos an various incomplete bits that will be worked out in later PRs. This is highly experimental code and will be refined in the next iterations but I wanted to avoid accumulating code locally.

Note 2: This enables log-server by default, so it's imperative that this isn't included in v1.1 release.

When looking at this, consider the overall design strategy and don't get hang up on the nits or smaller details as they're likely to change anyway.

What this achieves:
- Starts log-server by default (role is now enabled by default)
- Introduces Store/Release network messages for the log-server
- Implements pipelined Store messages from sequencers, no backfill ability.
- LogState management
- Provisional trim infrastructure
  • Loading branch information
AhmedSoliman committed Sep 9, 2024
1 parent 890ef57 commit 378e50e
Show file tree
Hide file tree
Showing 27 changed files with 1,822 additions and 244 deletions.
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ async-channel = "2.1.1"
async-trait = "0.1.73"
axum = { version = "0.7.5", default-features = false }
base64 = "0.22"
bitflags = { version = "2.6.0" }
bytes = { version = "1.7", features = ["serde"] }
bytes-utils = "0.1.3"
bytestring = { version = "1.2", features = ["serde"] }
Expand Down
1 change: 1 addition & 0 deletions crates/core/src/task_center_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ pub enum TaskKind {
#[strum(props(OnCancel = "abort"))]
Watchdog,
NetworkMessageHandler,
LogletWriter,
}

impl TaskKind {
Expand Down
4 changes: 4 additions & 0 deletions crates/log-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ restate-rocksdb = { workspace = true }
restate-types = { workspace = true, features = ["replicated-loglet"] }

anyhow = { workspace = true }
bitflags = { workspace = true }
bytes = { workspace = true }
chrono = { workspace = true }
codederror = { workspace = true }
dashmap = { workspace = true }
derive_more = { workspace = true }
futures = { workspace = true }
metrics = { workspace = true }
Expand All @@ -36,6 +39,7 @@ tokio = { workspace = true }
tokio-stream = { workspace = true, features = ["sync"] }
tokio-util = { workspace = true }
tracing = { workspace = true }
xxhash-rust = { workspace = true, features = ["xxh3"] }


[dev-dependencies]
Expand Down
12 changes: 12 additions & 0 deletions crates/log-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// by the Apache License, Version 2.0.

mod error;
mod loglet_worker;
mod logstore;
mod metadata;
mod metric_definitions;
Expand All @@ -18,3 +19,14 @@ mod service;

pub use error::LogServerBuildError;
pub use service::LogServerService;

#[cfg(test)]
pub(crate) fn setup_panic_handler() {
// Make sure that panics exits the process.
let orig_hook = std::panic::take_hook();
std::panic::set_hook(Box::new(move |panic_info| {
// invoke the default handler and exit the process
orig_hook(panic_info);
std::process::exit(1);
}));
}
Loading

0 comments on commit 378e50e

Please sign in to comment.