Skip to content

Commit fb94a25

Browse files
authored
polish constants (#914)
## πŸ“ Summary Increased ORDER_JOURNAL_CHANNEL_SIZE x 10 since it would get filled in busy slots. Removed 2 unused constants. ## βœ… I have completed the following steps: * [X] Run `make lint` * [X] Run `make test` * [ ] Added tests (if applicable)
1 parent 954c40f commit fb94a25

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

β€Žcrates/rbuilder-operator/src/clickhouse.rsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,8 @@ impl BidObserver for BuiltBlocksWriter {
536536
}
537537

538538
/// Channel size for the order journal. Orders are small and arrive frequently.
539-
const ORDER_JOURNAL_CHANNEL_SIZE: usize = 10 * 1024;
539+
/// A busy slow can have 30K-40K orders. 100K should be more than enough.
540+
const ORDER_JOURNAL_CHANNEL_SIZE: usize = 100 * 1024;
540541

541542
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
542543
struct SlotKey {

β€Žcrates/rbuilder/src/live_builder/order_input/mod.rsβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ pub struct OrderInputConfig {
129129
}
130130

131131
pub const DEFAULT_SERVE_MAX_CONNECTIONS: u32 = 4096;
132-
pub const DEFAULT_RESULTS_CHANNEL_TIMEOUT: Duration = Duration::from_millis(50);
133-
pub const DEFAULT_INPUT_CHANNEL_BUFFER_SIZE: usize = 10_000;
134132

135133
impl OrderInputConfig {
136134
#[allow(clippy::too_many_arguments)]

0 commit comments

Comments
Β (0)