Skip to content

Commit 423b974

Browse files
nipunn1313Convex, Inc.
authored andcommitted
Make export worker page size into a knob (#38327)
Make it a knob so we can adjust it for different use cases. GitOrigin-RevId: e62594c20f0e9cd5182194d78c3105af0eb9bf03
1 parent 45f3d2e commit 423b974

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

crates/application/src/exports/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use common::{
1010
ComponentPath,
1111
},
1212
fastrace_helpers::get_sampled_span,
13+
knobs::EXPORT_WORKER_PAGE_SIZE,
1314
persistence::LatestDocument,
1415
runtime::Runtime,
1516
types::{
@@ -146,7 +147,10 @@ where
146147
);
147148
}
148149
}
149-
let table_iterator = worker.database.table_iterator(ts, 1000).multi(tablet_ids);
150+
let table_iterator = worker
151+
.database
152+
.table_iterator(ts, *EXPORT_WORKER_PAGE_SIZE)
153+
.multi(tablet_ids);
150154

151155
let zipper = construct_zip_snapshot(
152156
worker,

crates/common/src/knobs.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,6 +1298,10 @@ pub static EXPORT_MAX_INFLIGHT_PREFETCH_BYTES: LazyLock<usize> = LazyLock::new(|
12981298
.clamp(1, u32::MAX as usize)
12991299
});
13001300

1301+
/// The page size to the table iterator in the export worker.
1302+
pub static EXPORT_WORKER_PAGE_SIZE: LazyLock<usize> =
1303+
LazyLock::new(|| env_config("EXPORT_WORKER_PAGE_SIZE", 1000));
1304+
13011305
/// Whether or not a service should propagate all upstream traces or perform its
13021306
/// own sampling
13031307
pub static PROPAGATE_UPSTREAM_TRACES: LazyLock<bool> =

0 commit comments

Comments
 (0)