Skip to content

Commit

Permalink
Fixes restatectl setting target nodeset size
Browse files Browse the repository at this point in the history
Previously, setting target nodeset size with restatectl would tell you that "No change"
```
// intentionally empty
```
  • Loading branch information
AhmedSoliman committed Feb 6, 2025
1 parent d730f92 commit 00fdd95
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
11 changes: 10 additions & 1 deletion crates/types/src/logs/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,18 @@ pub struct ReplicatedLogletConfig {

/// New type that enforces that the nodeset size is never larger than 128.
#[derive(
Debug, Clone, Copy, derive_more::Into, serde::Serialize, serde::Deserialize, Eq, PartialEq,
Debug,
Clone,
Copy,
derive_more::Into,
serde::Serialize,
serde::Deserialize,
Eq,
PartialEq,
derive_more::Display,
)]
#[serde(try_from = "u16", into = "u16")]
#[display("{_0}")]
pub struct NodeSetSize(u16);

impl NodeSetSize {
Expand Down
7 changes: 7 additions & 0 deletions tools/restatectl/src/commands/cluster/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ fn write_default_provider<W: fmt::Write>(
"Replication property",
config.replication_property.to_string(),
)?;
write_leaf(
w,
depth,
true,
"Nodeset size",
config.target_nodeset_size.to_string(),
)?;
}
}
Ok(())
Expand Down

0 comments on commit 00fdd95

Please sign in to comment.