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: Alter compactTo segments before compactFrom to avoid data loss if crash #34513

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

wayblink
Copy link
Collaborator

@wayblink wayblink commented Jul 9, 2024

@sre-ci-robot sre-ci-robot added the size/L Denotes a PR that changes 100-499 lines. label Jul 9, 2024
@mergify mergify bot added dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement labels Jul 9, 2024
Copy link
Contributor

mergify bot commented Jul 9, 2024

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

@wayblink
Copy link
Collaborator Author

wayblink commented Jul 9, 2024

/run-cpu-e2e

Copy link

codecov bot commented Jul 9, 2024

Codecov Report

Attention: Patch coverage is 82.60870% with 12 lines in your changes missing coverage. Please review.

Project coverage is 71.50%. Comparing base (07b94b4) to head (ef6510a).
Report is 6 commits behind head on master.

Current head ef6510a differs from pull request most recent head 3569bc6

Please upload reports for the commit 3569bc6 to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #34513       +/-   ##
===========================================
- Coverage   84.39%   71.50%   -12.89%     
===========================================
  Files         876     1127      +251     
  Lines      115815   139314    +23499     
===========================================
+ Hits        97740    99614     +1874     
- Misses      13757    35414    +21657     
+ Partials     4318     4286       -32     
Files Coverage Δ
internal/datacoord/compaction_trigger.go 86.80% <75.00%> (+0.79%) ⬆️
internal/datacoord/meta.go 85.32% <83.07%> (-0.68%) ⬇️

... and 331 files with indirect coverage changes

Copy link
Contributor

mergify bot commented Jul 9, 2024

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

@wayblink
Copy link
Collaborator Author

wayblink commented Jul 9, 2024

/run-cpu-e2e

Copy link
Contributor

mergify bot commented Jul 9, 2024

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

@wayblink
Copy link
Collaborator Author

wayblink commented Jul 9, 2024

/run-cpu-e2e

Copy link
Contributor

mergify bot commented Jul 9, 2024

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

Copy link
Contributor

mergify bot commented Jul 9, 2024

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

@wayblink
Copy link
Collaborator Author

wayblink commented Jul 9, 2024

/run-cpu-e2e

Copy link
Contributor

mergify bot commented Jul 9, 2024

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

@wayblink
Copy link
Collaborator Author

wayblink commented Jul 9, 2024

/run-cpu-e2e

Copy link
Contributor

mergify bot commented Jul 9, 2024

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

@wayblink
Copy link
Collaborator Author

wayblink commented Jul 9, 2024

rerun ut

Copy link
Contributor

mergify bot commented Jul 10, 2024

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

@wayblink
Copy link
Collaborator Author

/run-cpu-e2e

Signed-off-by: wayblink <anyang.wang@zilliz.com>
@czs007
Copy link
Contributor

czs007 commented Jul 11, 2024

/approve
/lgtm

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

binlogs = append(binlogs, metastore.BinlogsIncrement{Segment: seg})
}
if err := m.catalog.AlterSegments(m.ctx, append(compactFromInfos, newSegmentInfos...), binlogs...); err != nil {
log.Warn("fail to alter segments and new segment", zap.Error(err))
// alter compactTo before compactFrom segments to avoid data lost if service crash during AlterSegments
Copy link
Contributor

Choose a reason for hiding this comment

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

should we do m.segments.SetSegment(compactToSegmentInfo.GetID(), compactToSegmentInfo)
after we store compactToInfos?

Copy link
Contributor

Choose a reason for hiding this comment

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

can not finish this call in one request seems to be dangerous.
can we only handle 100 segments max at a time?

sre-ci-robot pushed a commit that referenced this pull request Jul 11, 2024
… avoid data loss if crash (#34532)

issue: #34512 
pr: #34513

Signed-off-by: wayblink <anyang.wang@zilliz.com>
@mergify mergify bot added the ci-passed label Jul 11, 2024
@sre-ci-robot sre-ci-robot merged commit 358e9a1 into milvus-io:master Jul 11, 2024
10 checks passed
chyezh pushed a commit to chyezh/milvus that referenced this pull request Jul 15, 2024
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/L Denotes a PR that changes 100-499 lines.
4 participants