Skip to content

Commit

Permalink
add serde tag for compaction mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeslieKid committed Sep 24, 2024
1 parent bf3b67c commit 1beaa16
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/example-cluster-3.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ grpc_port = 8833
mysql_port = 23307
deploy_mode = "Cluster"

[analytic]
compaction_offload = true
[analytic.compaction_mode]
compaction_mode = "Offload"
node_picker = "Remote"

[analytic.storage]
mem_cache_capacity = '1G'
Expand Down
1 change: 1 addition & 0 deletions src/analytic_engine/src/compaction/runner/node_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use serde::{Deserialize, Serialize};
use snafu::{ResultExt, Snafu};

#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(tag = "node_picker", content = "endpoint")]
pub enum NodePicker {
// Local node picker that specifies the local endpoint.
// The endpoint in the form `addr:port`.
Expand Down
1 change: 1 addition & 0 deletions src/analytic_engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ pub use crate::{
///
/// [CompactionMode::Local] means local compaction, no offloading.
#[derive(Clone, Default, Debug, Deserialize, Serialize)]
#[serde(tag = "compaction_mode")]
pub enum CompactionMode {
#[default]
Local,
Expand Down

0 comments on commit 1beaa16

Please sign in to comment.