File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
database/src/database_index_workers Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -425,6 +425,10 @@ pub static ENABLE_INDEX_BACKFILL: LazyLock<bool> =
425425pub static INDEX_BACKFILL_CHUNK_RATE : LazyLock < NonZeroU32 > =
426426 LazyLock :: new ( || env_config ( "INDEX_BACKFILL_CHUNK_RATE" , NonZeroU32 :: new ( 16 ) . unwrap ( ) ) ) ;
427427
428+ /// The page size to use when reading the table for an index backfill.
429+ pub static INDEX_BACKFILL_READ_SIZE : LazyLock < usize > =
430+ LazyLock :: new ( || env_config ( "INDEX_BACKFILL_READ_SIZE" , 500 ) ) ;
431+
428432/// How many index entries to write within a single database transaction.
429433/// Value is a tradeoff between grouping work, vs tying up resources on the
430434/// database, vs holding all entries in memory.
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ use common::{
1616 INDEX_BACKFILL_CHUNK_RATE ,
1717 INDEX_BACKFILL_CHUNK_SIZE ,
1818 INDEX_BACKFILL_PROGRESS_INTERVAL ,
19+ INDEX_BACKFILL_READ_SIZE ,
1920 INDEX_BACKFILL_WORKERS ,
2021 } ,
2122 persistence:: {
@@ -266,7 +267,7 @@ impl<RT: Runtime> IndexWriter<RT> {
266267 snapshot_ts,
267268 self . reader . clone ( ) ,
268269 self . retention_validator . clone ( ) ,
269- INDEX_BACKFILL_CHUNK_SIZE . get ( ) as usize ,
270+ * INDEX_BACKFILL_READ_SIZE ,
270271 ) ;
271272
272273 let ( index_update_tx, index_update_rx) = mpsc:: channel ( 32 ) ;
You can’t perform that action at this time.
0 commit comments