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](stream_load)fix bug when stream without content-length or chunk… #27752 #29169

Merged
merged 1 commit into from
Dec 30, 2023

Conversation

xingyingone
Copy link
Contributor

  1. forbid thed stream_load without content-length or chunked Transfer Encoding
  2. forbid thed stream_load both with content-length and chunked Transfer Encoding

Proposed changes

Issue Number: close #xxx

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...

@xingyingone
Copy link
Contributor Author

run buildall

Copy link
Contributor

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

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.85% (8018/21181)
Line Coverage: 29.54% (65197/220732)
Region Coverage: 28.97% (33497/115611)
Branch Coverage: 24.83% (17181/69196)
Coverage Report: http://coverage.selectdb-in.cc/coverage/f00f235f5d5d1592c053637ab6c9628e881fc986_f00f235f5d5d1592c053637ab6c9628e881fc986/report/index.html

@@ -285,6 +285,19 @@ Status StreamLoadAction::_on_header(HttpRequest* http_req, std::shared_ptr<Strea
}
}

if (UNLIKELY((http_req->header(HttpHeaders::CONTENT_LENGTH).empty() &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Does master branch also has this problem?

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

!ctx->is_chunked_transfer))) {
LOG(WARNING) << "content_length is empty and transfer-encoding!=chunked, please set "
"content_length or transfer-encoding=chunked";
return Status::InternalError(
Copy link
Contributor

Choose a reason for hiding this comment

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

DO NOT use internal error, because it is not an internal error. Maybe invalid input or invalid parameters?

@xiaokang
Copy link
Contributor

xiaokang commented Dec 28, 2023

#27752

@xingyingone
Copy link
Contributor Author

run buildall

Copy link
Contributor

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

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.87% (8017/21170)
Line Coverage: 29.54% (65192/220666)
Region Coverage: 28.99% (33507/115600)
Branch Coverage: 24.84% (17195/69216)
Coverage Report: http://coverage.selectdb-in.cc/coverage/bf12c5fea54c70569dff9563f26ec34180b47233_bf12c5fea54c70569dff9563f26ec34180b47233/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 48.02 seconds
stream load tsv: 569 seconds loaded 74807831229 Bytes, about 125 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: 29.7 seconds inserted 10000000 Rows, about 336K ops/s
storage size: 17170780858 Bytes

@xingyingone
Copy link
Contributor Author

run buildall

Copy link
Contributor

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

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.87% (8017/21170)
Line Coverage: 29.54% (65184/220665)
Region Coverage: 28.98% (33504/115601)
Branch Coverage: 24.83% (17188/69216)
Coverage Report: http://coverage.selectdb-in.cc/coverage/0331e7dc0e7a7a62b35cfd717cfe13f246737c93_0331e7dc0e7a7a62b35cfd717cfe13f246737c93/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 51.28 seconds
stream load tsv: 571 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: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.6 seconds inserted 10000000 Rows, about 337K ops/s
storage size: 17162584071 Bytes

1. forbid thed  stream_load without content-length or chunked Transfer Encoding
2. forbid thed  stream_load both with content-length and chunked Transfer Encoding
@xingyingone
Copy link
Contributor Author

run buildall

Copy link
Contributor

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

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.86% (8015/21170)
Line Coverage: 29.53% (65167/220689)
Region Coverage: 28.97% (33492/115609)
Branch Coverage: 24.82% (17182/69222)
Coverage Report: http://coverage.selectdb-in.cc/coverage/a2f3b77caac25c6cbddbef893333d85985960576_a2f3b77caac25c6cbddbef893333d85985960576/report/index.html

@xiaokang xiaokang changed the title [fix](stream_load)fix bug for stream [fix](stream_load)fix bug when stream without content-length or chunk… #27752 Dec 30, 2023
@xiaokang xiaokang merged commit f207976 into apache:branch-2.0 Dec 30, 2023
22 of 26 checks passed
lihuigang pushed a commit to lihuigang/doris that referenced this pull request Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants