Skip to content

Commit 67880f1

Browse files
committed
Add capacity configuration
1 parent 2a6a904 commit 67880f1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

server/src/option.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ pub struct Server {
199199
/// Livetail port
200200
pub grpc_port: u16,
201201

202+
/// Livetail channel capacity
203+
pub livetail_channel_capacity: usize,
204+
202205
/// Rows in Parquet Rowgroup
203206
pub row_group_size: usize,
204207

@@ -257,6 +260,10 @@ impl FromArgMatches for Server {
257260
.get_one::<u16>(Self::GRPC_PORT)
258261
.cloned()
259262
.expect("default for livetail port");
263+
self.livetail_channel_capacity = m
264+
.get_one::<usize>(Self::LIVETAIL_CAPACITY)
265+
.cloned()
266+
.expect("default for livetail port");
260267
// converts Gib to bytes before assigning
261268
self.query_memory_pool_size = m
262269
.get_one::<u8>(Self::QUERY_MEM_POOL_SIZE)
@@ -322,6 +329,7 @@ impl Server {
322329
pub const OPENID_CLIENT_SECRET: &str = "oidc-client-secret";
323330
pub const OPENID_ISSUER: &str = "oidc-issuer";
324331
pub const GRPC_PORT: &str = "grpc-port";
332+
pub const LIVETAIL_CAPACITY: &str = "livetail-capacity";
325333
// todo : what should this flag be
326334
pub const QUERY_MEM_POOL_SIZE: &str = "query-mempool-size";
327335
pub const ROW_GROUP_SIZE: &str = "row-group-size";
@@ -475,6 +483,16 @@ impl Server {
475483
.value_parser(value_parser!(u16))
476484
.help("Set port for livetail arrow flight server"),
477485
)
486+
.arg(
487+
Arg::new(Self::LIVETAIL_CAPACITY)
488+
.long(Self::LIVETAIL_CAPACITY)
489+
.env("P_LIVETAIL_CAPACITY")
490+
.value_name("NUMBER")
491+
.default_value("1000")
492+
.required(false)
493+
.value_parser(value_parser!(usize))
494+
.help("Set port for livetail arrow flight server"),
495+
)
478496
.arg(
479497
Arg::new(Self::QUERY_MEM_POOL_SIZE)
480498
.long(Self::QUERY_MEM_POOL_SIZE)

0 commit comments

Comments
 (0)