Skip to content
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
457 changes: 291 additions & 166 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,10 @@ strum = "0.24.1"
sub-cache = "0.2.1"
sys-info = "0.9"
sysinfo = "0.34.2"
tantivy = "0.22.0"
tantivy-common = "0.7.0"
tantivy = "0.25.0"
tantivy-common = "0.10.0"
tantivy-fst = "0.5"
tantivy-jieba = "0.11.0"
tantivy-jieba = "0.17.0"
temp-env = "0.3.0"
tempfile = "3.4.0"
terminal_size = "0.4.2"
Expand Down Expand Up @@ -665,8 +665,8 @@ recursive = { git = "https://github.com/datafuse-extras/recursive.git", rev = "1
sled = { git = "https://github.com/datafuse-extras/sled", tag = "v0.34.7-datafuse.1" }
state-machine-api = { git = "https://github.com/databendlabs/state-machine-api.git", tag = "v0.3.4" }
sub-cache = { git = "https://github.com/databendlabs/sub-cache", tag = "v0.2.1" }
tantivy = { git = "https://github.com/datafuse-extras/tantivy", rev = "7502370" }
tantivy-common = { git = "https://github.com/datafuse-extras/tantivy", rev = "7502370", package = "tantivy-common" }
tantivy-jieba = { git = "https://github.com/datafuse-extras/tantivy-jieba", rev = "0e300e9" }
tantivy = { git = "https://github.com/datafuse-extras/tantivy", rev = "9065a4d" }
tantivy-common = { git = "https://github.com/datafuse-extras/tantivy", rev = "9065a4d", package = "tantivy-common" }
tantivy-jieba = { git = "https://github.com/datafuse-extras/tantivy-jieba", rev = "ac27464" }
watcher = { git = "https://github.com/databendlabs/watcher", tag = "v0.4.2" }
xorfilter-rs = { git = "https://github.com/datafuse-extras/xorfilter", tag = "databend-alpha.4" }
6 changes: 6 additions & 0 deletions src/common/metrics/src/metrics/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ static BLOCK_INVERTED_INDEX_GENERATE_MILLISECONDS: LazyLock<Histogram> = LazyLoc
static BLOCK_INVERTED_INDEX_READ_MILLISECONDS: LazyLock<Histogram> = LazyLock::new(|| {
register_histogram_in_milliseconds("fuse_block_inverted_index_read_milliseconds")
});
static BLOCK_INVERTED_INDEX_READ_BYTES: LazyLock<Counter> =
LazyLock::new(|| register_counter("fuse_block_inverted_index_read_bytes"));
static BLOCK_INVERTED_INDEX_SEARCH_MILLISECONDS: LazyLock<Histogram> = LazyLock::new(|| {
register_histogram_in_milliseconds("fuse_block_inverted_index_search_milliseconds")
});
Expand Down Expand Up @@ -602,6 +604,10 @@ pub fn metrics_inc_block_inverted_index_read_milliseconds(c: u64) {
BLOCK_INVERTED_INDEX_READ_MILLISECONDS.observe(c as f64);
}

pub fn metrics_inc_block_inverted_index_read_bytes(c: u64) {
BLOCK_INVERTED_INDEX_READ_BYTES.inc_by(c);
}

pub fn metrics_inc_block_inverted_index_search_milliseconds(c: u64) {
BLOCK_INVERTED_INDEX_SEARCH_MILLISECONDS.observe(c as f64);
}
Expand Down
4 changes: 2 additions & 2 deletions src/query/config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3318,15 +3318,15 @@ pub struct CacheConfig {
#[clap(
long = "cache-inverted-index-meta-count",
value_name = "VALUE",
default_value = "3000"
default_value = "30000"
)]
pub inverted_index_meta_count: u64,

/// Max bytes of cached inverted index filters used. Set it to 0 to disable it.
#[clap(
long = "cache-inverted-index-filter-size",
value_name = "VALUE",
default_value = "2147483648"
default_value = "64424509440"
)]
pub inverted_index_filter_size: u64,

Expand Down
4 changes: 2 additions & 2 deletions src/query/config/src/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -756,8 +756,8 @@ impl Default for CacheConfig {
table_bloom_index_filter_size: 2147483648,
disk_cache_table_bloom_index_data_size: 0,
disk_cache_table_bloom_index_meta_size: 0,
inverted_index_meta_count: 3000,
inverted_index_filter_size: 2147483648,
inverted_index_meta_count: 30000,
inverted_index_filter_size: 64424509440,
inverted_index_filter_memory_ratio: 0,
vector_index_meta_count: 30000,
vector_index_filter_size: 64424509440,
Expand Down
2 changes: 1 addition & 1 deletion src/query/ee/tests/it/inverted_index/index_refresh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ async fn test_fuse_do_refresh_inverted_index() -> Result<()> {
let queries = vec![
("rust".to_string(), vec![0, 1]),
("java".to_string(), vec![2]),
("data".to_string(), vec![1, 4, 5]),
("data".to_string(), vec![4, 1, 5]),
];

for (query_text, ids) in queries.into_iter() {
Expand Down
34 changes: 18 additions & 16 deletions src/query/service/tests/it/storages/testdata/caches_table.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
---------- TABLE INFO ------------
DB.Table: 'system'.'caches', Table: caches-table_id:1, ver:0, Engine: SystemCache
-------- TABLE CONTENTS ----------
+-------------+----------------------------------------------+----------+----------+------------+----------+----------+----------+----------+
| Column 0 | Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 | Column 7 | Column 8 |
+-------------+----------------------------------------------+----------+----------+------------+----------+----------+----------+----------+
| 'test-node' | 'memory_cache_bloom_index_file_meta_data' | 0 | 0 | 3000 | 'count' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_bloom_index_filter' | 0 | 0 | 2147483648 | 'bytes' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_column_oriented_segment_info' | 0 | 0 | 1073741824 | 'bytes' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_compact_segment_info' | 0 | 0 | 1073741824 | 'bytes' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_iceberg_table' | 0 | 0 | 1024 | 'count' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_inverted_index_file' | 0 | 0 | 2147483648 | 'bytes' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_inverted_index_file_meta_data' | 0 | 0 | 3000 | 'count' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_parquet_meta_data' | 0 | 0 | 3000 | 'count' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_prune_partitions' | 0 | 0 | 256 | 'count' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_segment_statistics' | 0 | 0 | 1073741824 | 'bytes' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_table_snapshot' | 0 | 0 | 256 | 'count' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_table_statistics' | 0 | 0 | 256 | 'count' | 0 | 0 | 0 |
+-------------+----------------------------------------------+----------+----------+------------+----------+----------+----------+----------+
+-------------+----------------------------------------------+----------+----------+-------------+----------+----------+----------+----------+
| Column 0 | Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 | Column 7 | Column 8 |
+-------------+----------------------------------------------+----------+----------+-------------+----------+----------+----------+----------+
| 'test-node' | 'memory_cache_bloom_index_file_meta_data' | 0 | 0 | 3000 | 'count' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_bloom_index_filter' | 0 | 0 | 2147483648 | 'bytes' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_column_oriented_segment_info' | 0 | 0 | 1073741824 | 'bytes' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_compact_segment_info' | 0 | 0 | 1073741824 | 'bytes' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_iceberg_table' | 0 | 0 | 1024 | 'count' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_inverted_index_file' | 0 | 0 | 64424509440 | 'bytes' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_inverted_index_file_meta_data' | 0 | 0 | 30000 | 'count' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_parquet_meta_data' | 0 | 0 | 3000 | 'count' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_prune_partitions' | 0 | 0 | 256 | 'count' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_segment_statistics' | 0 | 0 | 1073741824 | 'bytes' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_table_snapshot' | 0 | 0 | 256 | 'count' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_table_statistics' | 0 | 0 | 256 | 'count' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_vector_index_file' | 0 | 0 | 64424509440 | 'bytes' | 0 | 0 | 0 |
| 'test-node' | 'memory_cache_vector_index_file_meta_data' | 0 | 0 | 30000 | 'count' | 0 | 0 | 0 |
+-------------+----------------------------------------------+----------+----------+-------------+----------+----------+----------+----------+


Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ DB.Table: 'system'.'configs', Table: configs-table_id:1, ver:0, Engine: SystemCo
| 'cache' | 'enable_table_meta_cache' | 'true' | '' |
| 'cache' | 'iceberg_table_meta_count' | '1024' | '' |
| 'cache' | 'inverted_index_filter_memory_ratio' | '0' | '' |
| 'cache' | 'inverted_index_filter_size' | '2147483648' | '' |
| 'cache' | 'inverted_index_meta_count' | '3000' | '' |
| 'cache' | 'inverted_index_filter_size' | '64424509440' | '' |
| 'cache' | 'inverted_index_meta_count' | '30000' | '' |
| 'cache' | 'meta_service_ownership_cache' | 'false' | '' |
| 'cache' | 'segment_block_metas_count' | '0' | '' |
| 'cache' | 'segment_statistics_bytes' | '1073741824' | '' |
Expand Down
1 change: 1 addition & 0 deletions src/query/storages/common/index/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ bitvec = { workspace = true }
bytemuck = { workspace = true }
bytes = { workspace = true }
cbordata = { workspace = true }
crc32fast = { workspace = true }
fastrace = { workspace = true }
feistel-permutation-rs = { workspace = true }
goldenfile = { workspace = true }
Expand Down
Loading