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

enhance: Periodically synchronize segments to datanode watcher #33420

Merged
merged 12 commits into from
May 30, 2024

Conversation

xiaocai2333
Copy link
Contributor

issue: #32809

@sre-ci-robot sre-ci-robot added the size/XL Denotes a PR that changes 500-999 lines. label May 28, 2024
@mergify mergify bot added dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement labels May 28, 2024
Copy link
Contributor

mergify bot commented May 28, 2024

@xiaocai2333 ut workflow job failed, comment rerun ut can trigger the job again.

Copy link
Contributor

mergify bot commented May 28, 2024

@xiaocai2333 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

Copy link

codecov bot commented May 28, 2024

Codecov Report

Attention: Patch coverage is 80.35714% with 33 lines in your changes are missing coverage. Please review.

Project coverage is 82.19%. Comparing base (3d29907) to head (36e1504).
Report is 9 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #33420      +/-   ##
==========================================
- Coverage   82.21%   82.19%   -0.02%     
==========================================
  Files        1012     1013       +1     
  Lines      129202   129387     +185     
==========================================
+ Hits       106223   106353     +130     
- Misses      19001    19060      +59     
+ Partials     3978     3974       -4     
Files Coverage Δ
internal/datacoord/compaction.go 90.97% <100.00%> (+2.36%) ⬆️
internal/datacoord/meta.go 94.32% <100.00%> (+0.04%) ⬆️
internal/datacoord/segment_operator.go 85.18% <ø> (ø)
internal/datacoord/server.go 71.83% <100.00%> (-0.18%) ⬇️
internal/datacoord/sync_segments_scheduler.go 100.00% <100.00%> (ø)
internal/datanode/data_node.go 82.27% <100.00%> (+0.07%) ⬆️
internal/datanode/metacache/meta_cache.go 100.00% <100.00%> (ø)
pkg/util/paramtable/component_param.go 98.50% <100.00%> (+<0.01%) ⬆️
internal/datanode/services.go 80.66% <21.42%> (-7.96%) ⬇️

... and 31 files with indirect coverage changes

@xiaocai2333
Copy link
Contributor Author

/run-cpu-e2e

Copy link
Contributor

mergify bot commented May 28, 2024

@xiaocai2333 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

Copy link
Contributor

mergify bot commented May 28, 2024

@xiaocai2333 ut workflow job failed, comment rerun ut can trigger the job again.

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
@sre-ci-robot sre-ci-robot added size/XXL Denotes a PR that changes 1000+ lines. and removed size/XL Denotes a PR that changes 500-999 lines. labels May 29, 2024
configs/milvus.yaml Outdated Show resolved Hide resolved
log := log.With(zap.Int64("collectionID", collectionID), zap.Int64("partitionID", partitionID),
zap.String("channelName", channelName), zap.Int64("nodeID", nodeID))
segments := sss.meta.SelectSegments(WithCollection(collectionID), WithChannel(channelName), SegmentFilterFunc(func(info *SegmentInfo) bool {
return info.GetPartitionID() == partitionID
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new WithPartition filter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to do this.

}

for _, seg := range segments {
compactTo := int64(-1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to related to compaction any more.

zap.Error(err))
continue
}
for _, channelName := range collInfo.VChannelNames {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can execute concurrently at the channel level?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thinks it's no necessary. I already add the concurrently for load pk in datanode.

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Copy link
Contributor

mergify bot commented May 30, 2024

@xiaocai2333 ut workflow job failed, comment rerun ut can trigger the job again.

@xiaocai2333
Copy link
Contributor Author

rerun ut

@@ -285,3 +248,56 @@ func (c *metaCacheImpl) rangeWithFilter(fn func(id int64, info *SegmentInfo), fi
}
}
}

func (c *metaCacheImpl) DetectMissingSegments(segments map[int64]struct{}) []int64 {
c.mu.Lock()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RLock?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, oversight.

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
select {
case <-sss.quit:
log.Info("sync segments scheduler quit")
ticker.Stop()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

@czs007
Copy link
Contributor

czs007 commented May 30, 2024

/approve
/lgtm

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: czs007, xiaocai2333

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mergify mergify bot added the ci-passed label May 30, 2024
@sre-ci-robot sre-ci-robot merged commit 7763718 into milvus-io:master May 30, 2024
15 checks passed
xiaocai2333 added a commit to xiaocai2333/milvus that referenced this pull request Jun 26, 2024
…s-io#33420)

issue: milvus-io#32809

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
xiaocai2333 added a commit to xiaocai2333/milvus that referenced this pull request Jun 26, 2024
…s-io#33420)

issue: milvus-io#32809

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
xiaocai2333 added a commit to xiaocai2333/milvus that referenced this pull request Jun 26, 2024
…s-io#33420)

issue: milvus-io#32809

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
@czs007 czs007 added the PR | need cherry-pick need cherry pick to other branches label Jun 26, 2024
@mergify mergify bot removed the ci-passed label Jun 26, 2024
xiaocai2333 added a commit to xiaocai2333/milvus that referenced this pull request Jun 26, 2024
…s-io#33420)

issue: milvus-io#32809

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
sre-ci-robot pushed a commit that referenced this pull request Jun 27, 2024
…watcher (#33420)  (#34186)

This PR primary picks up the SyncSegments functionality, including the
following commits:
- main functionality: #33420
- related fixes:
  - #33664
  - #33829
  - #34056
  - #34156

issue: #32809 
master pr: #33420, #33664, #33829, #34056, #34156

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
@czs007 czs007 added this to the 2.4.6 milestone Jun 27, 2024
@czs007 czs007 removed the PR | need cherry-pick need cherry pick to other branches label Jun 27, 2024
@mergify mergify bot added the ci-passed label Jun 27, 2024
yellow-shine pushed a commit to yellow-shine/milvus that referenced this pull request Jul 2, 2024
…s-io#33420)

issue: milvus-io#32809

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
@xiaocai2333 xiaocai2333 deleted the update_sync_segments branch July 9, 2024 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ci-passed dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement lgtm size/XL Denotes a PR that changes 500-999 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants