Commit Graph

94 Commits (1c3abd1aea8140c0f57524dc48b9e6a2082626d9)

Author SHA1 Message Date
congqixia c992a61a23
enhance: Separate allocator pkg in datacoord ()
Related to 

Move allocator interface and implementation into separate package. Also
update some unittest logic.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-08-22 10:06:56 +08:00
yihao.dai 227ecd3901
enhance: Remove the check for channel cp lag when generating compaction plan ()
issue: https://github.com/milvus-io/milvus/issues/35382

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2024-08-19 19:40:55 +08:00
yihao.dai 678018d9ca
enhance: Avoid unnecessary compaction ()
Estimate the import segment size based on DiskSegmentMaxSize(2G) to
avoid unnecessary compaction after import completed.

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2024-08-06 10:30:21 +08:00
wayblink 5bbb1c201c
enhance:support l2 single compaction ()


Signed-off-by: wayblink <anyang.wang@zilliz.com>
2024-08-01 14:36:13 +08:00
yihao.dai ca758c36cc
enhance: Pre-allocate ids for compaction ()
This PR removes the dependency of compaction on the ID allocator by
pre-allocating the logID and segmentID.

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2024-07-17 13:23:42 +08:00
wayblink 358e9a10d2
enhance: Alter compactTo segments before compactFrom to avoid data loss if crash ()


Signed-off-by: wayblink <anyang.wang@zilliz.com>
2024-07-12 00:55:34 +08:00
XuanYang-cn e0b39d8bf4
fix: Milvus panic when compaction disabled and dropping a collection ()
See also: 

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2024-07-11 14:44:52 +08:00
cai.zhang 4cf1a358ba
fix: Sync the sealed and flushed segments to datanode ()
issue: 

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2024-07-01 22:42:08 +08:00
wayblink a1232fafda
feat: Major compaction ()


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
zhenshan.cao ac4f3997ce
enhance: Reconstructing Compaction to possess persistence capability ()
issue 

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
2024-06-05 10:17:50 +08:00
yihao.dai 7730b910b9
enhance: Decouple compaction from shard ()
Decouple compaction from shard, remove dependencies on shards (e.g.
SyncSegments, injection).

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2024-05-24 09:07:41 +08:00
congqixia 8cf2cf5c94
enhance: Add `go-deadlock` as unittest only dependency ()
See also 

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
cai.zhang 6ea7633bd5
enhance: Add memory size for binlog ()
issue: 
1. add `MemorySize` field for insert binlog.
2. `LogSize` means the file size in the storage object.
3. `MemorySize` means the size of the data in the memory.

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
2024-05-15 12:59:34 +08:00
XuanYang-cn 6843d6d376
fix: Compaction trigger choose 2 same segments ()
DataNode would stuck at compactor try to lock the
same segmentID

See also: 

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2024-05-07 19:01:31 +08:00
Ted Xu fef7812254
enhance: trigger compaction by size ()
See 

---------

Signed-off-by: Ted Xu <ted.xu@zilliz.com>
2024-04-23 12:11:24 +08:00
Bingyi Sun bdc70dfc6a
feat: Add global mmap enable configuration ()
https://github.com/milvus-io/milvus/issues/31279

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2024-03-18 15:17:10 +08:00
Buqian Zheng 3c80083f51
feat: [Sparse Float Vector] add sparse vector support to milvus components ()
add sparse float vector support to different milvus components,
including proxy, data node to receive and write sparse float vectors to
binlog, query node to handle search requests, index node to build index
for sparse float column, etc.

https://github.com/milvus-io/milvus/issues/29419

---------

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2024-03-13 14:32:54 -07:00
congqixia 1936aa4caa
enhance: Check channel cp lag before generate compaction task ()
See also 

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-03-05 13:39:01 +08:00
jaime 4b0c3dd377
enhance: index meta use independent rather than global meta lock ()
issue: https://github.com/milvus-io/milvus/issues/30837

Signed-off-by: jaime <yun.zhang@zilliz.com>
2024-03-04 16:56:59 +08:00
congqixia 6387403639
fix: Prevent clone when selecting segments from meta ()
See also 

Previously the `SelectSegments` changed to clone all return value
preventing possible update to returned info.

Since meta is implemented following COW rules, this shall not happen and
any update on segment shall have copy before it.

This PR:
- Remove clone for read-only Get segment info
- Add Segment Operator abstraction for changing segment
- Implemnt COW for updating MaxRowNum

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-03-01 13:59:02 +08:00
XuanYang-cn 2867f50fcc
fix: Clear DN unkown compaction tasks ()
If DC restarted,  those unkonwn compaction tasks
will never get call back in DN, so that the segments in the compaction
task will be locked, unable to sync and compaction again, blocking cp
advance and compaction executing.

See also: 

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2024-03-01 11:31:00 +08:00
XuanYang-cn 6959630652
fix: donot set l0 segment as growing when savebinlogs ()
This PR fixes negative growing L0 segments in Metrics

See also: , 

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2024-02-04 10:21:06 +08:00
xige-16 033eae9e73
enhance: Set segment.maxSize param to 1024M ()
issue:  
/kind improvement

When the number of vector columns increases, the number of rows per
segment will decrease. In order to reduce the impact on vector indexing
performance, it is necessary to increase the segment max limit.

If a collection has multiple vector fields with memory and disk indices
on different vector fields, the size limit after segment compaction is
the minimum of segment.maxSize and segment.diskSegmentMaxSize.

Signed-off-by: xige-16 <xi.ge@zilliz.com>

---------

Signed-off-by: xige-16 <xi.ge@zilliz.com>
2024-01-29 10:17:02 +08:00
XuanYang-cn 0b6beb7e0f
fix: Fill in info in CompactionSegmentBinlogs ()
After , PartitionID and CollectionID should be filled in
CompactionSegmentBinlog so that DataNode can compose
the correct logPath. However There're some places left forgotten to fill
in the information, causing Datanode downloading `xxx/0/0/xxxx/xxxx`
binlogs during compaction

See also: 

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2024-01-26 10:51:02 +08:00
smellthemoon e52ce370b6
enhance:don't store logPath in meta to reduce memory ()
don't store logPath in meta to reduce memory, when service get
segmentinfo, generate logpath from logid.


Signed-off-by: lixinguo <xinguo.li@zilliz.com>
Co-authored-by: lixinguo <xinguo.li@zilliz.com>
2024-01-18 22:06:31 +08:00
smellthemoon 1c1f2a1371
enhance:change some logs ()
related 

Signed-off-by: lixinguo <xinguo.li@zilliz.com>
Co-authored-by: lixinguo <xinguo.li@zilliz.com>
2024-01-05 16:12:48 +08:00
wei liu 69a71e11d1
enhance: Add config for auto upgrade segment index ()
This PR add config for auto upgrade segment index to index engine's
version.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2023-12-12 11:56:37 +08:00
SimFG ef18e6a532
enhance: Use a non-blocking method to trigger compaction when saveBinlogPath is executed ()
/kind improvement
issue: 

Signed-off-by: SimFG <bang.fu@zilliz.com>
2023-12-12 10:16:39 +08:00
XuanYang-cn 5bac7f7897
fix: Fix L0 compaction in datacoord ()
See also: 

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2023-12-05 18:44:37 +08:00
smellthemoon adce6aab4f
fix:handle err when ManualCompaction ()
handle err when ManualCompaction


Signed-off-by: lixinguo <xinguo.li@zilliz.com>
Co-authored-by: lixinguo <xinguo.li@zilliz.com>
2023-11-30 17:06:31 +08:00
XuanYang-cn 9b371067d2
feat: Add Compaction views and triggers ()
- Add Compaction l0 views
- Add Compaction scheduler
- Add Compaction triggerv2
- Add Compaction view manager

See also: 

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2023-11-23 17:30:25 +08:00
Enwei Jiao 7445d3711c
feat: trigger compaction to handle index version ()
issue: https://github.com/milvus-io/milvus/issues/28441

---------

Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
2023-11-21 09:26:22 +08:00
SimFG 26f06dd732
Format the code ()
Signed-off-by: SimFG <bang.fu@zilliz.com>
2023-09-21 09:45:27 +08:00
XuanYang-cn b2e7cbdf4b
Remove TimeTravel in compactor ()
Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2023-09-04 17:41:48 +08:00
wayblink 21eeb37ce9
Save binlog timestampFrom, timestampTo meta when compact ()
Signed-off-by: wayblink <anyang.wang@zilliz.com>
2023-08-08 21:17:21 +08:00
xige-16 6f18587f35
Fix small segment compaction ()
Signed-off-by: xige-16 <xi.ge@zilliz.com>
2023-07-26 14:49:01 +08:00
cai.zhang b15e34db21
Add contraint for compaction based indexed segments ()
Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
2023-07-23 21:31:00 +08:00
Enwei Jiao 66fdc71479
Refactor logs in DataCoord & DataNode ()
Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
2023-07-14 15:56:31 +08:00
congqixia 41af0a98fa
Use go-api/v2 for milvus-proto ()
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2023-06-09 01:28:37 +08:00
Enwei Jiao 7e645dabf1
Add trace log for datacoord ()
Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
2023-05-12 09:53:21 +08:00
congqixia 5aa9db0d38
Add collection level auto compaction enabled config ()
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2023-05-10 17:45:20 +08:00
XuanYang-cn 72485c9eeb
Remove index check to trigger compaction ()
Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2023-04-24 20:26:34 +08:00
jaime c9d0c157ec
Move some modules from internal to public package ()
Signed-off-by: jaime <yun.zhang@zilliz.com>
2023-04-06 19:14:32 +08:00
yah01 319f1773af
Fix segment not found if forward delete to empty segment ()
Signed-off-by: yah01 <yang.cen@zilliz.com>
2023-03-03 14:13:49 +08:00
cai.zhang e5f408dceb
Merge IndexCoord and DataCoord ()
Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
2023-01-04 19:37:36 +08:00
Jiquan Long ff2a68e65a
Fix collection not exist when tried to do recovery ()
Signed-off-by: longjiquan <jiquan.long@zilliz.com>
2023-01-04 16:37:35 +08:00
Ten Thousand Leaves ef3fcdf65b
Small candidate compaction should only happen with >1 segments ()
/kind improvement

Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>

Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>
2022-12-16 10:01:23 +08:00
Ten Thousand Leaves a81c9cc11c
Recalculate segment max size during compaction ()
issue: 

/kind improvement

Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>

Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>
2022-12-13 15:39:21 +08:00
Xiaofan e977e014a9
Fix flush didn't respect binaryvector and other schemas ()
Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>

Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>
2022-12-12 10:33:26 +08:00
Ten Thousand Leaves d67db2ed9b
Make compaction target able to exceed segment max size by a bit ()
issue: 
Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>

Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>
2022-12-09 16:03:20 +08:00