Commit Graph

439 Commits

Author SHA1 Message Date
sre-ci-robot
7ba85504ba
[automated] Bump milvus version to v2.4.16 (#37795)
Some checks failed
Code Checker / Code Checker AMD64 Ubuntu 22.04 (push) Waiting to run
Code Checker / Code Checker Amazonlinux 2023 (push) Waiting to run
Code Checker / Code Checker rockylinux8 (push) Waiting to run
Mac Code Checker / Code Checker MacOS 12 (push) Waiting to run
Build and test / Build and test AMD64 Ubuntu 22.04 (push) Waiting to run
Build and test / UT for Cpp (push) Blocked by required conditions
Build and test / UT for Go (push) Blocked by required conditions
Build and test / Integration Test (push) Blocked by required conditions
Build and test / Upload Code Coverage (push) Blocked by required conditions
Daily Release / Run Daily Release (push) Has been cancelled
Bump milvus version to v2.4.16
Signed-off-by: sre-ci-robot sre-ci-robot@users.noreply.github.com

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-20 11:46:37 +08:00
congqixia
f813fb4563
enhance: [GoSDK] Remove example in main pkg to make ut script work (#37472)
Related to #31293

Example with main func/package causes `go list` command failed with vcs
error. This PR removes example files with main package. The example
snippet shall be added back in runnable test format.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-11-07 10:50:25 +08:00
yellow-shine
b3de4b0edd
enhance: refine the pipeline (#37412)
1. enhance: allow to pass conan repo url
2. enhance: add throttle for cpu-e2e and cpp-unit-test pipeline

---------

Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>
2024-11-06 10:24:30 +08:00
sre-ci-robot
b2c36efb5f
[automated] Bump milvus version to v2.4.15 (#37458)
Bump milvus version to v2.4.15
Signed-off-by: sre-ci-robot sre-ci-robot@users.noreply.github.com

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-05 21:18:32 +08:00
yellow-shine
22745a4980
Bump milvus version to v2.4.14 (#37253)
Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>
2024-10-29 20:58:23 +08:00
yellow-shine
8902e2220e
enhance: enable asan for cpp unittest (#37041)
https://github.com/milvus-io/milvus/issues/35854

Signed-off-by: chyezh <chyezh@outlook.com>
Co-authored-by: chyezh <chyezh@outlook.com>
2024-10-23 17:21:27 +08:00
sre-ci-robot
aee61973fb
[automated] Bump milvus version to v2.4.13-hotfix (#36947)
Bump milvus version to v2.4.13-hotfix
Signed-off-by: sre-ci-robot sre-ci-robot@users.noreply.github.com

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-17 14:17:28 +08:00
Linkwei
c271c21f17
enhance: improve scripts standalone_embed,add upgrade (#36924)
[[skip ci] improve scripts standalone_embed,add upgrade](enhance:
improvement scripts standalone_embed,add upgrade #36921)

Signed-off-by: zilliz <zilliz@zillizdeMacBook-Pro.local>
Co-authored-by: zilliz <zilliz@zillizdeMacBook-Pro.local>
2024-10-16 17:51:23 +08:00
sre-ci-robot
d45e2677b9
[automated] Bump milvus version to v2.4.13 (#36801)
Bump milvus version to v2.4.13
Signed-off-by: sre-ci-robot sre-ci-robot@users.noreply.github.com

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-12 15:07:24 +08:00
cai.zhang
d1060c0e05
enhance: Update antlr version and refine parsing not in (#36745)
issue: #36672

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2024-10-11 14:03:21 +08:00
Rijin-N
a05a37a583
enhance: GCS native support (GCS implemented using Google Cloud Storage libraries) (#36214)
Native support for Google cloud storage using the Google Cloud Storage
libraries. Authentication is performed using GCS service account
credentials JSON.

Currently, Milvus supports Google Cloud Storage using S3-compatible APIs
via the AWS SDK. This approach has the following limitations:

1. Overhead: Translating requests between S3-compatible APIs and GCS can
introduce additional overhead.
2. Compatibility Limitations: Some features of the original S3 API may
not fully translate or work as expected with GCS.

To address these limitations, This enhancement is needed.

Related Issue: #36212
2024-09-30 13:23:32 +08:00
cai.zhang
2c9bb4dfa3
feat: Support stats task to sort segment by PK (#35054)
issue: #33744 

This PR includes the following changes:
1. Added a new task type to the task scheduler in datacoord: stats task,
which sorts segments by primary key.
2. Implemented segment sorting in indexnode.
3. Added a new field `FieldStatsLog` to SegmentInfo to store token index
information.

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2024-09-02 14:19:03 +08:00
zhenshan.cao
d10aa4626f
enhance: [skip e2e] add make run-test-cpp with support for filter gtest (#35829)
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
2024-08-29 20:03:02 +08:00
Zhen Ye
70bc0e4538
enhance: add skip 3rdparty env var (#35736)
issue: #35611

- call `conan install` is too slow for developer, add option to skip it.

Signed-off-by: chyezh <chyezh@outlook.com>
2024-08-29 14:21:01 +08:00
Zhen Ye
75da36d1aa
enhance: enable asan for milvus (#35627)
issue: #35626

Signed-off-by: chyezh <chyezh@outlook.com>
2024-08-23 21:06:58 +08:00
Zhen Ye
a773836b89
enhance: optimize milvus core building (#35610)
issue: #35549,#35611,#35633

- remove milvus_segcore milvus_indexbuilder..., add libmilvus_core
- core building only link once
- move opendal compilation into cmake
- fix odr

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2024-08-23 12:35:02 +08:00
yellow-shine
7420115b5e
enhance: pinpoint revision of 3thirdparty package (#35325)
issue: https://github.com/milvus-io/milvus/issues/35340

---------

Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>
2024-08-08 09:46:22 +08:00
chyezh
c725416288
enhance: move streaming proto into pkg (#35284)
issue: #33285

- move streaming related proto into pkg.
- add v2 message type and change flush message into v2 message.

Signed-off-by: chyezh <chyezh@outlook.com>
2024-08-07 10:34:16 +08:00
chyezh
14051fed7d
enhance: streaming service client (#34656)
issue: #33285

- implement streaming service client.
- implement producing and consuming service client by streaming coord
client and streaming node client.

Signed-off-by: chyezh <chyezh@outlook.com>
2024-08-05 21:38:15 +08:00
yellow-shine
241c71fdde
enhance: use docker compose instead of docker-compose (#35208)
https://github.com/milvus-io/milvus/issues/35209

---------

Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>
2024-08-02 19:32:32 +08:00
yellow-shine
7bf68d8657
enhance: upgrade conan version (#35215)
Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>
2024-08-02 19:22:15 +08:00
wei liu
c45f38aa61
enhance: Update protobuf-go to protobuf-go v2 (#34394)
issue: #34252

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-07-29 11:31:51 +08:00
Ted Xu
63f0154dfb
fix: enable milvus.yaml check (#34567)
See #32168

---------

Signed-off-by: Ted Xu <ted.xu@zilliz.com>
2024-07-25 18:05:46 +08:00
chyezh
39c7e06bc5
enhance: add message and msgstream msgpack adaptor (#34874)
issue: #33285

- make message builder and message conversion type safe
- add adaptor type and function to adapt old msgstream msgpack and
message interface

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2024-07-22 20:59:42 +08:00
chyezh
cc8f7aa110
fix: streaming service related fix patch (#34696)
issue: #33285

- add idAlloc interface
- fix binary unsafe bug for message
- fix service discovery lost when repeated address with different server
id

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2024-07-16 15:49:38 +08:00
chyezh
fda720b880
enhance: streaming service grpc utilities (#34436)
issue: #33285

- add two grpc resolver (by session and by streaming coord assignment
service)
- add one grpc balancer (by serverID and roundrobin)
- add lazy conn to avoid block by first service discovery
- add some utility function for streaming service

Signed-off-by: chyezh <chyezh@outlook.com>
2024-07-15 20:49:38 +08:00
pingliu
8c42f1341d
doc: [skip e2e] add extraConfig to embed milvus (#34395)
Signed-off-by: ping.liu <ping.liu@zilliz.com>
2024-07-03 18:20:17 +08:00
sammy.huang
b14482baa6
enhance: [skip e2e] use disk ann when os is ubuntu (#34236)
issue: https://github.com/milvus-io/milvus/issues/34222

Signed-off-by: Liang Huang <sammy.huang@zilliz.com>
2024-06-27 20:50:13 +08:00
pingliu
b12c34a8ba
doc: [skip e2e] change milvus docker image version to v2.4.5 (#34135)
Signed-off-by: ping.liu <ping.liu@zilliz.com>
2024-06-25 14:30:04 +08:00
chyezh
b9237280c2
enhance: wal interface definition (#33745)
issue: #33285

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2024-06-24 10:34:12 +08:00
Yinzuo Jiang
7d74edd6dd
fix: update clang-tidy and clang-format from 10 to 12 (#33141)
Default llvm toolchain version in Ubuntu 20.04 is 10, while Ubuntu 22.04
does not have `clang-tidy-10` or `clang-format-10` by default.

issue: #33142

Signed-off-by: Patrick Weizhi Xu <weizhi.xu@zilliz.com>
Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
2024-06-13 15:27:58 +08:00
chyezh
2b7ee1968f
enhance: new messsage interface for log service (#33286)
issue: #33285

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2024-06-11 10:38:01 +08:00
wayblink
a1232fafda
feat: Major compaction (#33620)
#30633

Signed-off-by: wayblink <anyang.wang@zilliz.com>
Co-authored-by: MrPresent-Han <chun.han@zilliz.com>
2024-06-10 21:34:08 +08:00
chyezh
f53ab54c5d
enhance: async cgo utility (#33133)
issue: #30926, #33132

- implement future-based cgo utility.

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2024-06-09 22:55:53 +08:00
cai.zhang
27cc9f2630
enhance: Support analyze data (#33651)
issue: #30633

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Co-authored-by: chasingegg <chao.gao@zilliz.com>
2024-06-06 17:37:51 +08:00
Jiquan Long
0c5d8660aa
feat: support inverted index for array (#33452)
issue: https://github.com/milvus-io/milvus/issues/27704

---------

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
2024-05-31 09:47:47 +08:00
shaoting-huang
de7901121f
Upgrade go from 1.20 to 1.21 (#33047)
Signed-off-by: shaoting-huang [shaoting-huang@zilliz.com]

issue: https://github.com/milvus-io/milvus/issues/32982

# Background
Go 1.21 introduces several improvements and changes over Go 1.20, which
is quite stable now. According to
[Go 1.21 Release Notes](https://tip.golang.org/doc/go1.21), the big
difference of Go 1.21 is enabling Profile-Guided Optimization by
default, which can improve performance by around 2-14%. Here are the
summary steps of PGO:
1. Build Initial Binary (Without PGO)
2. Deploying the Production Environment
3. Run the program and collect Performance Analysis Data (CPU pprof)
4. Analyze the Collected Data and Select a Performance Profile for PGO
5. Place the Performance Analysis File in the Main Package Directory and
Name It default.pgo
6. go build Detects the default.pgo File and Enables PGO
7. Build and Release the Updated Binary (With PGO)
8. Iterate and Repeat the Above Steps
<img width="657" alt="Screenshot 2024-05-14 at 15 57 01"
src="https://github.com/milvus-io/milvus/assets/167743503/b08d4300-0be1-44dc-801f-ce681dabc581">

# What does this PR do
There are three experiments, search benchmark by Zilliz test platform,
search benchmark by open-source
[VectorDBBench](https://github.com/zilliztech/VectorDBBench?tab=readme-ov-file),
and search benchmark with PGO. We do both search benchmarks by Zilliz
test platform and by VectorDBBench to reduce reliance on a single
experimental result. Besides, we validate the performance enhancement
with PGO.

## Search Benchmark Report by Zilliz Test Platform
An upgrade to Go 1.21 was conducted on a Milvus Standalone server,
equipped with 16 CPUs and 64GB of memory. The search performance was
evaluated using a 1 million entry local dataset with an L2 metric type
in a 768-dimensional space. The system was tested for concurrent
searches with 50 concurrent tasks for 1 hour, each with a 20-second
interval. The reason for using one server rather than two servers to
compare is to guarantee the same data source and same segment state
after compaction.

Test Sequence:
1. Go 1.20 Initial Run: Insert data, build index, load index, and
search.
2. Go 1.20 Rebuild: Rebuild the index with the same dataset, load index,
and search.
3. Go 1.21 Load: Upload to Go 1.21 within the server. Then load the
index from the second run, and search.
4. Go 1.21 Rebuild: Rebuild the index with the same dataset, load index,
and search.

Search Metrics: 
| Metric | Go 1.20 | Go 1.20 Rebuild Index | Go 1.21 | Go 1.21 Rebuild
Index |

|----------------------------|------------------|-----------------|------------------|-----------------|
| `search requests` | 10,942,683 | 16,131,726 | 16,200,887 | 16,331,052
|
| `search fails` | 0 | 0 | 0 | 0 |
| `search RT_avg` (ms) | 16.44 | 11.15 | 11.11 | 11.02 |
| `search RT_min` (ms) | 1.30 | 1.28 | 1.31 | 1.26 |
| `search RT_max` (ms) | 446.61 | 233.22 | 235.90 | 147.93 |
| `search TP50` (ms) | 11.74 | 10.46 | 10.43 | 10.35 |
| `search TP99` (ms) | 92.30 | 25.76 | 25.36 | 25.23 |
| `search RPS` | 3,039 | 4,481 | 4,500 | 4,536 |

### Key Findings
The benchmark tests reveal that the index build time with Go 1.20 at
340.39 ms and Go 1.21 at 337.60 ms demonstrated negligible performance
variance in index construction. However, Go 1.21 offers slightly better
performance in search operations compared to Go 1.20, with improvements
in handling concurrent tasks and reducing response times.

## Search Benchmark Report By VectorDb Bench
Follow
[VectorDBBench](https://github.com/zilliztech/VectorDBBench?tab=readme-ov-file)
to create a VectorDb Bench test for Go 1.20 and Go 1.21. We test the
search performance with Go 1.20 and Go 1.21 (without PGO) on the Milvus
Standalone system. The tests were conducted using the Cohere dataset
with 1 million entries in a 768-dimensional space, utilizing the COSINE
metric type.

Search Metrics: 
Metric | Go 1.20 | Go 1.21 without PGO
-- | -- | --
Load Duration (seconds) | 1195.95 | 976.37
Queries Per Second (QPS) | 841.62 | 875.89
99th Percentile Serial Latency (seconds) | 0.0047 | 0.0076
Recall | 0.9487 | 0.9489

### Key Findings
Go 1.21 indicates faster index loading times and larger search QPS
handling.

## PGO Performance Test
Milvus has already added
[net/http/pprof](https://pkg.go.dev/net/http/pprof) in the metrics. So
we can curl the CPU profile directly by running
`curl -o default.pgo
"http://${MILVUS_SERVER_IP}:${MILVUS_SERVER_PORT}/debug/pprof/profile?seconds=${TIME_SECOND}"`
to collect the profile as the default.pgo during the first search. Then
I build Milvus with PGO and use the same index to run the search again.
The result is as below:

Search Metrics
| Metric | Go 1.21 Without PGO | Go 1.21 With PGO | Change (%) |

|---------------------------------------------|------------------|-----------------|------------|
| `search Requests` | 2,644,583 | 2,837,726 | +7.30% |
| `search Fails` | 0 | 0 | N/A |
| `search RT_avg` (ms) | 11.34 | 10.57 | -6.78% |
| `search RT_min` (ms) | 1.39 | 1.32 | -5.18% |
| `search RT_max` (ms) | 349.72 | 143.72 | -58.91% |
| `search TP50` (ms) | 10.57 | 9.93 | -6.05% |
| `search TP99` (ms) | 26.14 | 24.16 | -7.56% |
| `search RPS`                 | 4,407       | 4,729       | +7.30%    |

### Key Findings
PGO led to a notable enhancement in search performance, particularly in
reducing the maximum response time by 58% and increasing the search QPS
by 7.3%.

### Further Analysis
Generate a diff flame graphs between two CPU profiles by running `go
tool pprof -http=:8000 -diff_base nopgo.pgo pgo.pgo -normalize`

<img width="1894" alt="goprofiling"
src="https://github.com/milvus-io/milvus/assets/167743503/ab9e91eb-95c7-4963-acd9-d1c3c73ee010">
Further insight of HnswIndexNode and Milvus Search Handler
<img width="1906" alt="hnsw"
src="https://github.com/milvus-io/milvus/assets/167743503/a04cf4a0-7c97-4451-b3cf-98afc20a0b05">
<img width="1873" alt="search_handler"
src="https://github.com/milvus-io/milvus/assets/167743503/5f4d3982-18dd-4115-8e76-460f7f534c7f">

After applying PGO to the Milvus server, the CPU utilization of the
faiss::fvec_L2 function has decreased. This optimization significantly
enhances the performance of the
[HnswIndexNode::Search::searchKnn](e0c9c41aa2/src/index/hnsw/hnsw.cc (L203))
method, which is frequently invoked by Knowhere during high-concurrency
searches. As the explanation from Go release notes, the function might
be more aggressively inlined by Go compiler during the second build with
the CPU profiling collected from the first run. As a result, the search
handler efficiency within Milvus DataNode has improved, allowing the
server to process a higher number of search queries per second (QPS).



# Conclusion
The combination of Go 1.21 and PGO has led to substantial enhancements
in search performance for Milvus server, particularly in terms of search
QPS and response times, making it more efficient for handling
high-concurrency search operations.

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2024-05-22 13:21:39 +08:00
Alexander Guzhva
f20becb725
fix: Download and install cmake for the current platform, not x86_64 only (#32548)
issue #32476 

tested on x86_64 and aarch64. I'm not sure what needs to be done on some
exotic architectures.

Signed-off-by: Alexandr Guzhva <alexanderguzhva@gmail.com>
2024-05-22 11:15:39 +08:00
pingliu
a1b5d7d6d3
doc: [skip-e2e] change milvus docker image version to v2.4.1 (#33170)
Signed-off-by: ping.liu <ping.liu@zilliz.com>
2024-05-20 16:21:38 +08:00
Yinzuo Jiang
2cc50d80a3
fix: add openblas in install_deps.sh (#33065)
Install openblas using apt or yum in scripts/install_deps.sh, update
documentations and fix some typos related to build and installation.

issue: #33056, #33066

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
2024-05-17 14:53:37 +08:00
congqixia
8cf2cf5c94
enhance: Add go-deadlock as unittest only dependency (#33063)
See also #33062

This PR:

- Add `lock.RWMutex` & `lock.Mutex` alias to switch implementation based
  on build flags
- When build flags has `test` in it, use `go-deadlock` to detect
  possible deadlocks
- Replace all `sync.RWMutex` & `sync.Mutex` in datacoord pkg

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-05-15 16:33:34 +08:00
congqixia
244d2c04f6
feat: Add milvusclient package and migrate GoSDK (#32907)
Related to #31293

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-05-10 18:01:30 +08:00
aoiasd
54a51b1236
enhance: Support dynamic config for opentelemetry trace (#32169)
relate: https://github.com/milvus-io/milvus/issues/31940

---------

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2024-05-09 17:43:30 +08:00
Aldrin
b6c06ff2c3
fix: Removed tests on non existent directories and solved name resolution errors (#32266)
issue: #32254

Signed-off-by: Ald392 <imagesai32@gmail.com>
2024-04-30 11:33:26 +08:00
shaoting-huang
f5e1fc757c
fix: [skip e2e] dev container yaml indentation error (#32601)
issue: #32594

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2024-04-26 10:15:27 +08:00
pingliu
72b054e0c3
doc: change milvus docker image version to v2.4.0 (#32489)
change milvus docker image version to v2.4.0

Signed-off-by: ping.liu <ping.liu@zilliz.com>
2024-04-23 09:47:23 +08:00
Ted Xu
744a54a534
enhance: enforce milvus.yaml assertion in UT (#32357)
See #32168

Signed-off-by: Ted Xu <ted.xu@zilliz.com>
2024-04-19 16:47:20 +08:00
yiwangdr
1cd15d9322
test: support segment release in integration test (#31190)
issue: #29507

Notice that api_testonly.go files should be guarded by compiler tag
`test`, so that production build rules don't compile them and these APIs
don't get misused.

Signed-off-by: yiwangdr <yiwangdr@gmail.com>
2024-04-09 11:39:17 +08:00
congqixia
f399416b92
enhance: Use gotestsum to run go unit test (#31622)
See also #31490

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-03-27 15:29:10 +08:00
congqixia
4da8b6607d
enhance: Add scripts to use gotestsum to execute integration test (#31490)
See also #31489

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-03-22 10:29:06 +08:00