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

Dump bmp #2349

Closed
wants to merge 53 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
79224c8
admin list nodes : doc update
vsian Dec 2, 2024
6e1d76b
Dump ivf index test (#2312)
vsian Dec 2, 2024
6976ec3
Fix two bugs (#2314)
JinHai-CN Dec 3, 2024
3a90c53
Change 'cluster' to 'admin' in config (#2316)
JinHai-CN Dec 3, 2024
3f80334
Update fulltext query builder (#2317)
yangzq50 Dec 4, 2024
dd60572
Fix wrong error message (#2320)
JinHai-CN Dec 4, 2024
fc4b2d3
Update HTTP API doc (#2319)
JinHai-CN Dec 4, 2024
d7aea62
Fix2 (#2315)
small-turtle-1 Dec 4, 2024
10f6d72
Add distance_factors / similarity_factors / score_factors framework (…
JinHai-CN Dec 4, 2024
0c75b56
Fix bmp. (#2325)
small-turtle-1 Dec 5, 2024
2333b0e
Fix memory leak (#2326)
JinHai-CN Dec 5, 2024
258f12d
Add global variable of memory cache miss (#2328)
JinHai-CN Dec 5, 2024
c7294e4
Initial draft of Cluster user guide (#2318)
writinwaters Dec 5, 2024
e8f54b3
Make IK analyzer work (#2327)
yingfeng Dec 5, 2024
f89816f
Follower can't be switched to learner (#2332)
writinwaters Dec 6, 2024
1e7dd5e
Show disk cache miss (#2331)
JinHai-CN Dec 6, 2024
7720ef4
minor editorial updates (#2333)
writinwaters Dec 6, 2024
87c2591
Enable ik_max_word for IK analyzer (#2335)
yingfeng Dec 6, 2024
206e60a
Improve fulltext performance (#2329)
yangzq50 Dec 6, 2024
a02cd64
Update README (#2337)
JinHai-CN Dec 6, 2024
f72b82c
Fix register same node issue (#2330)
JinHai-CN Dec 6, 2024
c33a073
Updated the full-text search part of the search guide (#2340)
writinwaters Dec 6, 2024
9d36a77
Dump fulltext index (#2336)
vsian Dec 7, 2024
60359e7
Update doc for search (#2341)
yingfeng Dec 9, 2024
693fca5
Refactor code (#2339)
JinHai-CN Dec 9, 2024
bc8b7c2
Updated full-text search scoring and syntax (#2343)
writinwaters Dec 9, 2024
4f444b5
Fix import parquet (#2344)
small-turtle-1 Dec 10, 2024
8c382b9
Fix secondary index bug (#2345)
yangzq50 Dec 10, 2024
c2bc245
make BMMPIndexInmem inheret from BaseMemIndex
vsian Dec 9, 2024
1223229
add GetMemIndex in segment_index_entry
vsian Dec 9, 2024
8aaf7db
bmp index dump by memory usage
vsian Dec 9, 2024
044a11b
add restart test, but skip for bugs
vsian Dec 10, 2024
28eb90a
Delete python/test_cluster/start_minio.py
vsian Dec 10, 2024
5e73f70
Delete python/test_cluster/tmp.py
vsian Dec 10, 2024
6c2919d
refactor : bmp in mem uses InMemIndexTracer
vsian Dec 10, 2024
986cfc5
fix ivf : after dump, shouldn't call decrease memory usage when destr…
vsian Dec 10, 2024
e4f3241
Updated configuration entry descriptions (#2346)
writinwaters Dec 10, 2024
72897c4
Reduce memory and io consumption for filter (#2347)
yangzq50 Dec 10, 2024
36bf846
Fix restart test bug (#2352)
JinHai-CN Dec 10, 2024
44eb4fe
Enable tokenizer config for analyzer (#2351)
yingfeng Dec 10, 2024
35ad40c
Fix compile error (#2350)
JinHai-CN Dec 10, 2024
776ee45
Feature: total hits count to trigger output hits row count (#2348)
JinHai-CN Dec 11, 2024
c75caf1
Minor editorial updates (#2355)
writinwaters Dec 11, 2024
d7116d2
Fix table status revert. (#2353)
small-turtle-1 Dec 11, 2024
6298379
Support whitespace analyzer (#2354)
yangzq50 Dec 11, 2024
8f4d8d7
Add test on search option (#2357)
JinHai-CN Dec 11, 2024
19cfc28
Add new configs (#2359)
JinHai-CN Dec 12, 2024
6deaa6a
Fix restart (#2356)
small-turtle-1 Dec 12, 2024
9cfe2cd
Fix thread race (#2360)
JinHai-CN Dec 12, 2024
1c12fcc
Update version info to v0.5.0-dev6 (#2358)
JinHai-CN Dec 12, 2024
2f0aa4c
Fix compatible (#2362)
small-turtle-1 Dec 12, 2024
eac8d7b
Refactor python SDK (#2364)
JinHai-CN Dec 12, 2024
bb9f2eb
fix compile
vsian Dec 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/slow_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
# Fix sanitizer: https://github.com/ClickHouse/ClickHouse/issues/64086
old_value=$(sudo sysctl -n vm.mmap_rnd_bits)
sudo sysctl -w vm.mmap_rnd_bits=28
sudo docker exec ${TESTER_CONTAINER} bash -c "cd /infinity/ && rm -fr /var/infinity && export INF_DIRECTORY=`cat .tester_env` && echo INF_DIRECTORY=${INF_DIRECTORY} && python3 tools/run_cluster_test.py --infinity_path=cmake-build-debug/src/infinity --infinity_dir=${INF_DIRECTORY}"
sudo docker exec ${TESTER_CONTAINER} bash -c "cd /infinity/ && rm -fr /var/infinity && export INF_DIRECTORY=`cat .tester_env` && echo INF_DIRECTORY=${INF_DIRECTORY} && python3 tools/run_cluster_test.py --infinity_path=cmake-build-debug/src/infinity --infinity_dir=${INF_DIRECTORY} --minio_port=9005 --minio_console_port=9006"
sudo sysctl -w vm.mmap_rnd_bits=$old_value

- name: Collect thread sanitizer output in cluster test
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
id: run_cluster_test
run: |
sudo docker exec ${TESTER_CONTAINER} bash -c "rm -rf /root/.config/pip/pip.conf && cd /infinity/ && pip3 uninstall -y infinity-sdk infinity-embedded-sdk && cd python/infinity_sdk/ && pip3 install . -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host tuna.tsinghua.edu.cn && cd ../.."
sudo docker exec ${TESTER_CONTAINER} bash -c "cd /infinity/ && rm -fr /var/infinity && export INF_DIRECTORY=`cat .tester_env` && echo INF_DIRECTORY=${INF_DIRECTORY} && python3 tools/run_cluster_test.py --infinity_path=cmake-build-debug/src/infinity --infinity_dir=${INF_DIRECTORY}"
sudo docker exec ${TESTER_CONTAINER} bash -c "cd /infinity/ && rm -fr /var/infinity && export INF_DIRECTORY=`cat .tester_env` && echo INF_DIRECTORY=${INF_DIRECTORY} && python3 tools/run_cluster_test.py --infinity_path=cmake-build-debug/src/infinity --infinity_dir=${INF_DIRECTORY} --minio_port=9005 --minio_console_port=9006"

- name: Collect cluster test output
if: ${{ !cancelled() }}
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
MINIO_DIR=~/minio_data_$(od -An -N4 -tx4 /dev/urandom | tr -d ' ')
echo "MINIO_CONTAINER=${MINIO_CONTAINER}" >> $GITHUB_ENV
echo "MINIO_DIR=${MINIO_DIR}" >> $GITHUB_ENV
sudo docker rm -f -v ${MINIO_CONTAINER} && sudo rm -fr ${MINIO_DIR} && sudo mkdir ${MINIO_DIR} && sudo docker run -d --net=container:${BUILDER_CONTAINER} --name ${MINIO_CONTAINER} -e "MINIO_ROOT_PASSWORD=minioadmin" -e "MINIO_ROOT_USER=minioadmin" -v ${MINIO_DIR}:/data quay.io/minio/minio server /data --console-address ":9001" && sleep 5s
sudo docker rm -f -v ${MINIO_CONTAINER} && sudo rm -fr ${MINIO_DIR} && sudo mkdir ${MINIO_DIR} && sudo docker run -d --net=container:${BUILDER_CONTAINER} --name ${MINIO_CONTAINER} -e "MINIO_ROOT_PASSWORD=minioadmin" -e "MINIO_ROOT_USER=minioadmin" -v ${MINIO_DIR}:/data quay.io/minio/minio server /data --console-address ":9006" --address ":9005" && sleep 5s

- name: Start infinity debug version with minio
if: ${{ !cancelled() && !failure() }}
Expand Down Expand Up @@ -290,7 +290,7 @@ jobs:
MINIO_DIR=~/minio_data_$(od -An -N4 -tx4 /dev/urandom | tr -d ' ')
echo "MINIO_CONTAINER=${MINIO_CONTAINER}" >> $GITHUB_ENV
echo "MINIO_DIR=${MINIO_DIR}" >> $GITHUB_ENV
sudo docker rm -f -v ${MINIO_CONTAINER} && sudo rm -fr ${MINIO_DIR} && sudo mkdir ${MINIO_DIR} && sudo docker run -d --net=container:${BUILDER_CONTAINER} --name ${MINIO_CONTAINER} -e "MINIO_ROOT_PASSWORD=minioadmin" -e "MINIO_ROOT_USER=minioadmin" -v ${MINIO_DIR}:/data quay.io/minio/minio server /data --console-address ":9001" && sleep 5s
sudo docker rm -f -v ${MINIO_CONTAINER} && sudo rm -fr ${MINIO_DIR} && sudo mkdir ${MINIO_DIR} && sudo docker run -d --net=container:${BUILDER_CONTAINER} --name ${MINIO_CONTAINER} -e "MINIO_ROOT_PASSWORD=minioadmin" -e "MINIO_ROOT_USER=minioadmin" -v ${MINIO_DIR}:/data quay.io/minio/minio server /data --console-address ":9006" --address ":9005" && sleep 5s

- name: Start infinity release version with minio
if: ${{ !cancelled() && !failure() }}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<img width="187" src="https://github.com/infiniflow/infinity/assets/7248/015e1f02-1f7f-4b09-a0c2-9d261cd4858b"/>
<img width="187" src="https://github.com/infiniflow/infinity/assets/7248/015e1f02-1f7f-4b09-a0c2-9d261cd4858b" alt="Infinity logo"/>
</div>


Expand All @@ -26,7 +26,7 @@ Infinity is a cutting-edge AI-native database that provides a wide range of sear
## ⚡️ Performance

<div class="column" align="middle">
<img src="https://github.com/user-attachments/assets/c4c98e23-62ac-4d1a-82e5-614bca96fe0a"/>
<img src="https://github.com/user-attachments/assets/c4c98e23-62ac-4d1a-82e5-614bca96fe0a" alt="Infinity performance comparison"/>
</div>

## 🌟 Key Features
Expand Down Expand Up @@ -60,9 +60,9 @@ Supports a wide range of data types including strings, numerics, vectors, and mo
Infinity supports two working modes, embedded mode and client-server mode. Infinity's embedded mode enables you to quickly embed Infinity into your Python applications, without the need to connect to a separate backend server. The following shows how to operate in embedded mode:

```bash
pip install infinity-embedded-sdk==0.5.0.dev5
pip install infinity-embedded-sdk==0.5.0.dev6
```
1. Use Infinity to conduct a dense vector search:
Use Infinity to conduct a dense vector search:
```python
import infinity_embedded

Expand Down
2 changes: 1 addition & 1 deletion benchmark/local_infinity/fulltext/fulltext_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void BenchmarkQuery(SharedPtr<Infinity> infinity, const String &db_name, const S
output_columns->emplace_back(select_rowid_expr);
output_columns->emplace_back(select_score_expr);
}
infinity->Search(db_name, table_name, search_expr, nullptr, nullptr, nullptr, output_columns, nullptr, nullptr, nullptr);
infinity->Search(db_name, table_name, search_expr, nullptr, nullptr, nullptr, output_columns, nullptr, nullptr, nullptr, false);
/*
auto result = infinity->Search(db_name, table_name, search_expr, nullptr, output_columns);
{
Expand Down
3 changes: 2 additions & 1 deletion benchmark/local_infinity/infinity_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ int main() {
output_columns,
nullptr,
nullptr,
nullptr);
nullptr,
false);
});
results.push_back(fmt::format("-> Select QPS: {}", total_times / tims_costing_second));
}
Expand Down
2 changes: 1 addition & 1 deletion benchmark/local_infinity/knn/knn_query_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ int main(int argc, char *argv[]) {
auto select_rowid_expr = new FunctionExpr();
select_rowid_expr->func_name_ = "row_id";
output_columns->emplace_back(select_rowid_expr);
auto result = infinity->Search(db_name, table_name, search_expr, nullptr, nullptr, nullptr, output_columns, nullptr, nullptr, nullptr);
auto result = infinity->Search(db_name, table_name, search_expr, nullptr, nullptr, nullptr, output_columns, nullptr, nullptr, nullptr, false);
{
auto &cv = result.result_table_->GetDataBlockById(0)->column_vectors;
auto &column = *cv[0];
Expand Down
2 changes: 1 addition & 1 deletion benchmark/remote_infinity/remote_query_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct InfinityClient {
transport->open();
CommonResponse response;
ConnectRequest request;
request.__set_client_version(26); // 0.5.0.dev5
request.__set_client_version(27); // 0.5.0.dev6
client->Connect(response, request);
session_id = response.session_id;
}
Expand Down
2 changes: 1 addition & 1 deletion client/cpp/infinity_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Client Client::Connect(const std::string &ip_address, uint16_t port) {
transport->open();
CommonResponse response;
ConnectRequest request;
request.__set_client_version(26); // 0.5.0.dev5
request.__set_client_version(27); // 0.5.0.dev6
client->Connect(response, request);
return {socket, transport, protocol, std::move(client), response.session_id};
}
Expand Down
4 changes: 2 additions & 2 deletions conf/follower.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[general]
version = "0.5.0"
time_zone = "utc-8"
server_mode = "cluster"
server_mode = "admin" # "standalone"

[network]
server_address = "0.0.0.0"
Expand Down Expand Up @@ -46,7 +46,7 @@ mem_index_capacity = 1048576
storage_type = "minio"

[storage.object_storage]
url = "127.0.0.1:9000"
url = "127.0.0.1:9005"
bucket_name = "infinity"
access_key = "minioadmin"
secret_key = "minioadmin"
Expand Down
2 changes: 1 addition & 1 deletion conf/infinity_conf.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ mem_index_capacity = 1048576

# S3 storage config example:
# [storage.object_storage]
# url = "127.0.0.1:9000"
# url = "127.0.0.1:9005"
# bucket_name = "infinity"
# access_key = "minioadmin"
# secret_key = "minioadmin"
Expand Down
72 changes: 72 additions & 0 deletions conf/infinity_minio_conf.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[general]
version = "0.5.0"
time_zone = "utc-8"

[network]
server_address = "0.0.0.0"
postgres_port = 5432
http_port = 23820
client_port = 23817
connection_pool_size = 128

[log]
log_filename = "infinity.log"
log_dir = "/var/infinity/log"
log_to_stdout = false
log_file_max_size = "10GB"
log_file_rotate_count = 10

# trace/debug/info/warning/error/critical 6 log levels, default: info
log_level = "info"

[storage]
persistence_dir = "/var/infinity/persistence"
data_dir = "/var/infinity/data"
# periodically activates garbage collection:
# 0 means real-time,
# s means seconds, for example "60s", 60 seconds
# m means minutes, for example "60m", 60 minutes
# h means hours, for example "1h", 1 hour
optimize_interval = "10s"
cleanup_interval = "60s"
compact_interval = "120s"
storage_type = "minio"
# dump memory index entry when it reachs the capacity
mem_index_capacity = 1048576

[storage.object_storage]
url = "127.0.0.1:9005"
bucket_name = "infinity"
access_key = "minioadmin"
secret_key = "minioadmin"
enable_https = false

# S3 storage config example:
# [storage.object_storage]
# url = "127.0.0.1:9005"
# bucket_name = "infinity"
# access_key = "minioadmin"
# secret_key = "minioadmin"
# enable_https = false

[buffer]
buffer_manager_size = "4GB"
lru_num = 7
temp_dir = "/var/infinity/tmp"
result_cache = "off"
memindex_memory_quota = "1GB"

[wal]
wal_dir = "/var/infinity/wal"
full_checkpoint_interval = "86400s"
delta_checkpoint_interval = "60s"
# delta_checkpoint_threshold = 1000000000
wal_compact_threshold = "1GB"

# flush_at_once: write and flush log each commit
# only_write: write log, OS control when to flush the log, default
# flush_per_second: logs are written after each commit and flushed to disk per second.
wal_flush = "only_write"

[resource]
resource_dir = "/var/infinity/resource"
4 changes: 2 additions & 2 deletions conf/leader.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[general]
version = "0.5.0"
time_zone = "utc-8"
server_mode = "cluster"
server_mode = "admin" # "standalone"

[network]
server_address = "0.0.0.0"
Expand Down Expand Up @@ -46,7 +46,7 @@ mem_index_capacity = 1048576
storage_type = "minio"

[storage.object_storage]
url = "127.0.0.1:9000"
url = "127.0.0.1:9005"
bucket_name = "infinity"
access_key = "minioadmin"
secret_key = "minioadmin"
Expand Down
4 changes: 2 additions & 2 deletions conf/learner.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[general]
version = "0.5.0"
time_zone = "utc-8"
server_mode = "cluster"
server_mode = "admin" # "standalone"

[network]
server_address = "0.0.0.0"
Expand Down Expand Up @@ -46,7 +46,7 @@ mem_index_capacity = 1048576
storage_type = "minio"

[storage.object_storage]
url = "127.0.0.1:9000"
url = "127.0.0.1:9005"
bucket_name = "infinity"
access_key = "minioadmin"
secret_key = "minioadmin"
Expand Down
4 changes: 2 additions & 2 deletions conf/learner2.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[general]
version = "0.5.0"
time_zone = "utc-8"
server_mode = "cluster"
server_mode = "admin" # "standalone"

[network]
server_address = "0.0.0.0"
Expand Down Expand Up @@ -46,7 +46,7 @@ mem_index_capacity = 1048576
storage_type = "minio"

[storage.object_storage]
url = "127.0.0.1:9000"
url = "127.0.0.1:9005"
bucket_name = "infinity"
access_key = "minioadmin"
secret_key = "minioadmin"
Expand Down
2 changes: 2 additions & 0 deletions conf/pytest_parallel_infinity_conf.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ log_level = "trace"

[storage]
persistence_dir = "/var/infinity/persistence"
compact_interval = "10s"
cleanup_interval = "0s"

[buffer]
buffer_manager_size = "8GB"
Expand Down
4 changes: 2 additions & 2 deletions conf/pytest_parallel_infinity_follower.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[general]
version = "0.5.0"
time_zone = "utc-8"
server_mode = "cluster"
server_mode = "admin" # "standalone"

[network]
server_address = "0.0.0.0"
Expand Down Expand Up @@ -40,7 +40,7 @@ mem_index_capacity = 1048576
storage_type = "minio"

[storage.object_storage]
url = "127.0.0.1:9000"
url = "127.0.0.1:9005"
bucket_name = "infinity"
access_key = "pk9s2oJFX1qXLYObwIcz"
secret_key = "ho1G9xh2iKup4Xj9Ja3eRgg8bfwMyDv4fvkQGcZl"
Expand Down
4 changes: 2 additions & 2 deletions conf/pytest_parallel_infinity_leader.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[general]
version = "0.5.0"
time_zone = "utc-8"
server_mode = "cluster"
server_mode = "admin" # "standalone"

[network]
server_address = "0.0.0.0"
Expand Down Expand Up @@ -40,7 +40,7 @@ mem_index_capacity = 1048576
storage_type = "minio"

[storage.object_storage]
url = "127.0.0.1:9000"
url = "127.0.0.1:9005"
bucket_name = "infinity"
access_key = "minioadmin"
secret_key = "minioadmin"
Expand Down
2 changes: 1 addition & 1 deletion conf/pytest_parallel_infinity_minio.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ persistence_dir = "/var/infinity/persistence"
storage_type = "minio"

[storage.object_storage]
url = "127.0.0.1:9000"
url = "127.0.0.1:9005"
bucket_name = "infinity"
access_key = "minioadmin"
secret_key = "minioadmin"
Expand Down
10 changes: 7 additions & 3 deletions docs/getstarted/build_from_source.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ slug: /build_from_source
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Build Infinity from source, build and run unit/functional tests.

---

This document provides instructions for building Infinity from source, as well as building and running unit and functional tests.

:::tip NOTE
Expand Down Expand Up @@ -260,7 +264,7 @@ cmake --build . -t test_main

2. Install Python sdk of infinity:
```bash
pip install infinity-sdk==0.5.0.dev5
pip install infinity-sdk==0.5.0.dev6
```

3. Run the functional tests:
Expand All @@ -282,7 +286,7 @@ cmake --build . -t test_main

2. Install Python sdk of infinity:
```bash
pip install infinity-sdk==0.5.0.dev5
pip install infinity-sdk==0.5.0.dev6
```

3. Run the functional tests:
Expand All @@ -305,7 +309,7 @@ cmake --build . -t test_main

2. Install Python sdk of infinity:
```bash
pip install infinity-sdk==0.5.0.dev5
pip install infinity-sdk==0.5.0.dev6
```

3. Run the functional tests:
Expand Down
Loading