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

[fix](move-memtable) fix delta writer close after closed #26108

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

kaijchen
Copy link
Contributor

@kaijchen kaijchen commented Oct 30, 2023

Proposed changes

Fix concurrency issue where some delta writer meets "close after closed" issue.
Because some sink may be closed before other sinks to be opened,
the reference count dropps to 0 and the pool will be closed when the load is not done.

To fix the problem, we should init delta writer pool in sink prepare.
Because there is a barrier between prepare and open.
All the sinks should have been prepared before any of them may close.

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@kaijchen
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@kaijchen kaijchen changed the title [fix](move-memtable) init delta writer pool in sink prepare [fix](move-memtable) fix delta writer close after closed Oct 30, 2023
@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.37% (8475/22676)
Line Coverage: 29.67% (68524/230974)
Region Coverage: 28.24% (35587/126014)
Branch Coverage: 25.11% (18217/72556)
Coverage Report: http://coverage.selectdb-in.cc/coverage/c537473ca6489fcec8aa112b09790e6c40f35d5f_c537473ca6489fcec8aa112b09790e6c40f35d5f/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.31 seconds
stream load tsv: 554 seconds loaded 74807831229 Bytes, about 128 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.8 seconds inserted 10000000 Rows, about 347K ops/s
storage size: 17162099268 Bytes

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 31, 2023
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

Copy link
Collaborator

@TangSiyang2001 TangSiyang2001 left a comment

Choose a reason for hiding this comment

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

LGTM

@dataroaring dataroaring merged commit 4943917 into apache:master Nov 1, 2023
dutyu pushed a commit to dutyu/doris that referenced this pull request Nov 4, 2023
seawinde pushed a commit to seawinde/doris that referenced this pull request Nov 13, 2023
XuJianxu pushed a commit to XuJianxu/doris that referenced this pull request Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants