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

[opt](index compaction) optimize checks before index compaction #25486

Merged
merged 2 commits into from
Oct 26, 2023

Conversation

qidaye
Copy link
Contributor

@qidaye qidaye commented Oct 16, 2023

Proposed changes

If inverted index file is empty or corrupted, the index compaction will crash.
So we add more checks before apply index compaction.

index file count tests

CREATE TABLE t1
(
    k1 int ,
    k2 string,
    k3 char(50),
    k4 varchar(200),
    k5 int,
    index index_int (k1) using inverted,
    index index_str_k2 (k2) using inverted properties("parser"="english"),
    index index_str_k4 (k4) using inverted,
    index index_k5 (k5) using inverted
)
DISTRIBUTED BY RANDOM BUCKETS 1
PROPERTIES("replication_num" = "1");
-- q1
insert into t1 values(1, "json love anny", "json", "anny",1);
-- q2
insert into t1 values(1, "", "", "",null);
-- q3
insert into t1 values(1, null, null, null,null);

index file list

image

  1. q1
    image

  2. q2
    image

  3. q3
    image

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

@qidaye
Copy link
Contributor Author

qidaye commented Oct 16, 2023

run buildall

@github-actions
Copy link
Contributor

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

1 similar comment
@github-actions
Copy link
Contributor

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

@wm1581066 wm1581066 added dev/2.0.3 usercase Important user case type label labels Oct 16, 2023
@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.70% (8230/22423)
Line Coverage: 28.84% (65960/228694)
Region Coverage: 27.55% (34214/124169)
Branch Coverage: 24.26% (17418/71788)
Coverage Report: http://coverage.selectdb-in.cc/coverage/d91ce9bd594e619186863eabc9209bec707479ff_d91ce9bd594e619186863eabc9209bec707479ff/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.78 seconds
stream load tsv: 572 seconds loaded 74807831229 Bytes, about 124 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: 30 seconds loaded 861443392 Bytes, about 27 MB/s
insert into select: 29.1 seconds inserted 10000000 Rows, about 343K ops/s
storage size: 17162363337 Bytes

@qidaye qidaye requested review from xiaokang and airborne12 October 18, 2023 11:05
Copy link
Contributor

@xiaokang xiaokang 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 23, 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
Member

@airborne12 airborne12 left a comment

Choose a reason for hiding this comment

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

LGTM

@xiaokang xiaokang merged commit 005a363 into apache:master Oct 26, 2023
@qidaye qidaye deleted the index_compaction_checks branch October 26, 2023 03:35
gnehil pushed a commit to gnehil/doris that referenced this pull request Dec 4, 2023
@xiaokang xiaokang mentioned this pull request Dec 4, 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. dev/2.0.3-merged reviewed usercase Important user case type label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants