Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLN] Move max_block_size_bytes to block_manager_config #2535

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rust/worker/chroma_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ query_service:
worker_queue_size: 100
blockfile_provider:
Arrow:
max_block_size_bytes: 16384
block_manager_config:
max_block_size_bytes: 16384
block_cache_config:
lru:
capacity: 1000
Expand Down Expand Up @@ -97,8 +97,8 @@ compaction_service:
min_compaction_size: 10
blockfile_provider:
Arrow:
max_block_size_bytes: 16384
block_manager_config:
max_block_size_bytes: 16384
block_cache_config:
lru:
capacity: 1000
Expand Down
9 changes: 2 additions & 7 deletions rust/worker/src/blockstore/arrow/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,14 @@ pub(crate) const TEST_MAX_BLOCK_SIZE_BYTES: usize = 16384;

#[derive(Deserialize, Debug, Clone)]
pub(crate) struct ArrowBlockfileProviderConfig {
// Note: This provider has two dependent components that
// are both internal to the arrow blockfile provider.
// The BlockManager and the SparseIndexManager.
// We could have a BlockManagerConfig and a SparseIndexManagerConfig
// but the only configuration that is needed is the max_block_size_bytes
// so for now we just hoid this configuration in the ArrowBlockfileProviderConfig.
pub(crate) max_block_size_bytes: usize,
// pub(crate) max_block_size_bytes: usize,
pub(crate) block_manager_config: BlockManagerConfig,
pub(crate) sparse_index_manager_config: SparseIndexManagerConfig,
}

#[derive(Deserialize, Debug, Clone)]
pub(crate) struct BlockManagerConfig {
pub(crate) max_block_size_bytes: usize,
pub(crate) block_cache_config: CacheConfig,
}

Expand Down
2 changes: 1 addition & 1 deletion rust/worker/src/blockstore/arrow/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ impl Configurable<(ArrowBlockfileProviderConfig, Storage)> for ArrowBlockfilePro
};
Ok(ArrowBlockfileProvider::new(
storage.clone(),
blockfile_config.max_block_size_bytes,
blockfile_config.block_manager_config.max_block_size_bytes,
block_cache,
sparse_index_cache,
))
Expand Down
16 changes: 8 additions & 8 deletions rust/worker/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ mod tests {
worker_queue_size: 100
blockfile_provider:
Arrow:
max_block_size_bytes: 16384
block_manager_config:
max_block_size_bytes: 16384
block_cache_config:
lru:
capacity: 1000
Expand Down Expand Up @@ -253,8 +253,8 @@ mod tests {
min_compaction_size: 10
blockfile_provider:
Arrow:
max_block_size_bytes: 16384
block_manager_config:
max_block_size_bytes: 16384
block_cache_config:
lru:
capacity: 1000
Expand Down Expand Up @@ -326,8 +326,8 @@ mod tests {
worker_queue_size: 100
blockfile_provider:
Arrow:
max_block_size_bytes: 16384
block_manager_config:
max_block_size_bytes: 16384
block_cache_config:
lru:
capacity: 1000
Expand Down Expand Up @@ -383,8 +383,8 @@ mod tests {
min_compaction_size: 10
blockfile_provider:
Arrow:
max_block_size_bytes: 16384
block_manager_config:
max_block_size_bytes: 16384
block_cache_config:
lru:
capacity: 1000
Expand Down Expand Up @@ -474,8 +474,8 @@ mod tests {
worker_queue_size: 100
blockfile_provider:
Arrow:
max_block_size_bytes: 16384
block_manager_config:
max_block_size_bytes: 16384
block_cache_config:
lru:
capacity: 1000
Expand Down Expand Up @@ -531,8 +531,8 @@ mod tests {
min_compaction_size: 10
blockfile_provider:
Arrow:
max_block_size_bytes: 16384
block_manager_config:
max_block_size_bytes: 16384
block_cache_config:
lru:
capacity: 1000
Expand Down Expand Up @@ -616,8 +616,8 @@ mod tests {
worker_queue_size: 100
blockfile_provider:
Arrow:
max_block_size_bytes: 16384
block_manager_config:
max_block_size_bytes: 16384
block_cache_config:
lru:
capacity: 1000
Expand Down Expand Up @@ -665,8 +665,8 @@ mod tests {
min_compaction_size: 10
blockfile_provider:
Arrow:
max_block_size_bytes: 16384
block_manager_config:
max_block_size_bytes: 16384
block_cache_config:
lru:
capacity: 1000
Expand Down
Loading