Configure replication factor 1 keyspace

This commit is contained in:
Dominik Werder
2025-03-13 10:30:40 +01:00
parent 2de85a7c51
commit 1d3b998809
9 changed files with 92 additions and 94 deletions
+1
View File
@@ -1320,6 +1320,7 @@ impl CaConn {
shape,
ch.conf.min_quiets(),
ch.conf.is_polled(),
ch.conf.replication(),
&|| CaWriterValueState::new(st.series_status, chinfo.series.to_series()),
)?;
self.handle_writer_establish_inner(cid, writer)?;
+15 -10
View File
@@ -1,6 +1,6 @@
use err::Error;
use netpod::log::*;
use netpod::Database;
use netpod::log::*;
use regex::Regex;
use scywr::config::ScyllaIngestConfig;
use serde::Deserialize;
@@ -32,6 +32,7 @@ pub struct CaIngestOpts {
scylla_st: ScyllaIngestConfig,
scylla_mt: ScyllaIngestConfig,
scylla_lt: ScyllaIngestConfig,
scylla_st_rf1: ScyllaIngestConfig,
array_truncate: Option<u64>,
insert_worker_count: Option<usize>,
insert_worker_concurrency: Option<usize>,
@@ -80,6 +81,10 @@ impl CaIngestOpts {
&self.scylla_lt
}
pub fn scylla_config_st_rf1(&self) -> &ScyllaIngestConfig {
&self.scylla_st_rf1
}
pub fn search(&self) -> &Vec<String> {
&self.search
}
@@ -358,11 +363,11 @@ fn bool_true() -> bool {
mod serde_ingest_config_archiving {
use super::ChannelReadConfigApiFormat;
use super::IngestConfigArchiving;
use serde::Deserializer;
use serde::Serializer;
use serde::de;
use serde::ser;
use serde::ser::SerializeMap;
use serde::Deserializer;
use serde::Serializer;
use std::fmt;
impl ser::Serialize for IngestConfigArchiving {
@@ -421,9 +426,9 @@ mod serde_ChannelReadConfigApiFormat {
}
mod serde_replication_bool {
use serde::de;
use serde::Deserializer;
use serde::Serializer;
use serde::de;
use std::fmt;
pub fn serialize<S>(v: &bool, ser: S) -> Result<S::Ok, S::Error>
@@ -484,9 +489,9 @@ mod serde_replication_bool {
mod serde_option_channel_read_config {
use super::ChannelReadConfig;
use serde::de;
use serde::Deserializer;
use serde::Serializer;
use serde::de;
use std::fmt;
use std::time::Duration;
@@ -568,11 +573,7 @@ pub enum ChannelReadConfig {
impl ChannelReadConfig {
pub fn is_monitor(&self) -> bool {
if let Self::Monitor = self {
true
} else {
false
}
if let Self::Monitor = self { true } else { false }
}
}
@@ -680,6 +681,10 @@ impl ChannelConfig {
self.arch.is_polled
}
pub fn replication(&self) -> bool {
self.arch.replication
}
pub fn poll_conf(&self) -> Option<(u64,)> {
if self.is_polled() {
if let Some(ChannelReadConfig::Poll(x)) = self.arch.short_term {