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: Tidy compactor and remove dup codes #32198

Merged
merged 1 commit into from
May 23, 2024

Conversation

XuanYang-cn
Copy link
Contributor

@XuanYang-cn XuanYang-cn commented Apr 12, 2024

See also: #32451

@sre-ci-robot sre-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines. label Apr 12, 2024
@mergify mergify bot added dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement do-not-merge/missing-related-issue labels Apr 12, 2024
Copy link
Contributor

mergify bot commented Apr 12, 2024

@XuanYang-cn Please associate the related issue to the body of your Pull Request. (eg. “issue: #”)

@XuanYang-cn
Copy link
Contributor Author

before:
fu7suNSFSF
after:
EHamAMELpD

Copy link
Contributor

mergify bot commented Apr 12, 2024

@XuanYang-cn ut workflow job failed, comment rerun ut can trigger the job again.

Copy link
Contributor

mergify bot commented Apr 12, 2024

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

@XuanYang-cn
Copy link
Contributor Author

image

@XuanYang-cn
Copy link
Contributor Author

XuanYang-cn commented Apr 17, 2024

[2024/04/17 11:36:05.081 +08:00] [INFO] [compaction/mix_compactor.go:395] ["compact merge end"] [planID=449137855160647758] ["compactTo segment"=449137855160647760] ["remaining row count"=120000] ["expired entities"=0] ["binlog batch count"=6] ["download binlogs elapse"=704.603819ms] ["upload binlogs elapse"=1.524477025s] ["serWrite elapse"=1.146140723s] ["deRead elapse"=863.583372ms] ["total elapse"=4.238804939s]

Copy link
Contributor

mergify bot commented Apr 17, 2024

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

@XuanYang-cn XuanYang-cn force-pushed the enhance/tidy-binlogio branch 2 times, most recently from fb4a9e6 to 140261e Compare April 19, 2024 02:54
@XuanYang-cn
Copy link
Contributor Author

see also: #32448

@XuanYang-cn
Copy link
Contributor Author

rerun ut

@XuanYang-cn XuanYang-cn force-pushed the enhance/tidy-binlogio branch from 140261e to 02e9f9b Compare April 23, 2024 08:06
@XuanYang-cn
Copy link
Contributor Author

rerun ut

Copy link
Contributor

mergify bot commented Apr 23, 2024

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

@XuanYang-cn
Copy link
Contributor Author

/run-cpu-e2e

@XuanYang-cn XuanYang-cn force-pushed the enhance/tidy-binlogio branch from 02e9f9b to e2cc0d0 Compare April 23, 2024 11:08
Copy link
Contributor

mergify bot commented Apr 23, 2024

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

@XuanYang-cn XuanYang-cn force-pushed the enhance/tidy-binlogio branch from e2cc0d0 to e9ffa4e Compare April 24, 2024 04:11
Copy link
Contributor

mergify bot commented Apr 24, 2024

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

@XuanYang-cn
Copy link
Contributor Author

/run-cpu-e2e

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

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

Project coverage is 82.14%. Comparing base (de79011) to head (73acb1e).
Report is 11 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #32198      +/-   ##
==========================================
- Coverage   82.19%   82.14%   -0.05%     
==========================================
  Files        1009     1009              
  Lines      128851   128673     -178     
==========================================
- Hits       105912   105704     -208     
- Misses      18949    18978      +29     
- Partials     3990     3991       +1     
Files Coverage Δ
internal/datanode/compaction_executor.go 93.39% <100.00%> (ø)
internal/datanode/io/binlog_io.go 86.36% <ø> (-13.64%) ⬇️
internal/datanode/services.go 85.24% <100.00%> (+0.25%) ⬆️
internal/datanode/writebuffer/insert_buffer.go 100.00% <100.00%> (ø)
internal/datanode/writebuffer/segment_buffer.go 96.42% <100.00%> (+0.59%) ⬆️
internal/metastore/kv/binlog/binlog.go 74.31% <100.00%> (ø)
internal/datanode/l0_compactor.go 79.13% <55.55%> (ø)
internal/datanode/compaction/segment_writer.go 86.58% <86.58%> (ø)
internal/datanode/compaction/mix_compactor.go 79.62% <79.62%> (ø)

... and 39 files with indirect coverage changes

Copy link
Contributor

mergify bot commented May 20, 2024

@XuanYang-cn ut workflow job failed, comment rerun ut can trigger the job again.

1 similar comment
Copy link
Contributor

mergify bot commented May 20, 2024

@XuanYang-cn ut workflow job failed, comment rerun ut can trigger the job again.

Copy link
Contributor

mergify bot commented May 20, 2024

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

Copy link
Contributor

mergify bot commented May 20, 2024

@XuanYang-cn ut workflow job failed, comment rerun ut can trigger the job again.

Copy link
Contributor

mergify bot commented May 20, 2024

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

@XuanYang-cn
Copy link
Contributor Author

/run-cpu-e2e

@mergify mergify bot added the ci-passed label May 21, 2024
@XuanYang-cn XuanYang-cn force-pushed the enhance/tidy-binlogio branch from cb22325 to b37d7c0 Compare May 21, 2024 06:29
@mergify mergify bot removed the ci-passed label May 21, 2024
Copy link
Contributor

mergify bot commented May 21, 2024

@XuanYang-cn ut workflow job failed, comment rerun ut can trigger the job again.

@XuanYang-cn XuanYang-cn force-pushed the enhance/tidy-binlogio branch from b37d7c0 to 58419f2 Compare May 21, 2024 08:37
}

func (w *SegmentWriter) IsFull() bool {
w.writer.Flush()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to Flush each time we check IsFull?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Written memory size is valid after Flush()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So donot check isFull too frequently, its expensive

@@ -34,10 +35,10 @@ const (
)

type compactionExecutor struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

also move compactionExecutor to datanode/compaction/ dir?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Too many changes in one PR, maybe you could move it inside.

@@ -50,7 +52,7 @@ import (
)

type levelZeroCompactionTask struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

also move l0_compactor.go to datanode/compaction/ dir?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

YES, planning to do so.

@mergify mergify bot added the ci-passed label May 21, 2024
Add compaction package
remove compactor.go and compactor_test.go

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
@XuanYang-cn XuanYang-cn force-pushed the enhance/tidy-binlogio branch from 58419f2 to 73acb1e Compare May 22, 2024 06:10
@mergify mergify bot removed the ci-passed label May 22, 2024
@XuanYang-cn
Copy link
Contributor Author

rerun ut

@mergify mergify bot added the ci-passed label May 22, 2024
@czs007
Copy link
Collaborator

czs007 commented May 23, 2024

/approve
/lgtm

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: czs007, XuanYang-cn

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

@sre-ci-robot sre-ci-robot merged commit 22bddde into milvus-io:master May 23, 2024
15 checks passed
@XuanYang-cn XuanYang-cn deleted the enhance/tidy-binlogio branch May 23, 2024 02:24
XuanYang-cn added a commit to XuanYang-cn/milvus that referenced this pull request Jun 24, 2024
This PR consists of the following commits:

- enhance: Tidy compactor and remove dup codes (milvus-io#32198)
- fix: Fix l0 compactor may cause DN from OOM (milvus-io#33554)
- enhance: Add deltaRowCount in l0 compaction (milvus-io#33997)
- enhance: enable stream writer in compactions (milvus-io#32612)

See also: milvus-io#32451, milvus-io#33547, milvus-io#33998, milvus-io#31679
pr: milvus-io#32198, milvus-io#33554, milvus-io#33997, milvus-io#32612

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
sre-ci-robot pushed a commit that referenced this pull request Jun 25, 2024
This PR consists of the following commits:

- enhance: Tidy compactor and remove dup codes (#32198)
- fix: Fix l0 compactor may cause DN from OOM (#33554)
- enhance: Add deltaRowCount in l0 compaction (#33997)
- enhance: enable stream writer in compactions (#32612)
- fix: turn on compression on stream writers (#34067)
- fix: adding blob memory size in binlog serde (#33324)

See also: #32451, #33547, #33998, #31679
pr: #32198, #33554, #33997, #32612

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
Signed-off-by: Ted Xu <ted.xu@zilliz.com>
Co-authored-by: Ted Xu <ted.xu@zilliz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/compilation ci-passed dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement lgtm size/XXL Denotes a PR that changes 1000+ lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants