You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Cai-Yao (via GitHub)" <gi...@apache.org> on 2023/04/24 08:44:14 UTC
[GitHub] [doris] Cai-Yao opened a new pull request, #19000: [Refactor](exceptionsafe) add factory creator to some class
Cai-Yao opened a new pull request, #19000:
URL: https://github.com/apache/doris/pull/19000
# Proposed changes
Issue Number: close #xxx
## Problem summary
make schema_scanner, file_reader, stream_load thread safe.
## Checklist(Required)
* [ ] Does it affect the original behavior
* [ ] Has unit tests been added
* [ ] Has document been added or modified
* [ ] Does it need to update dependencies
* [ ] Is this PR support rollback (If NO, please explain WHY)
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #19000: [Refactor](exceptionsafe) add factory creator to some class
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19000:
URL: https://github.com/apache/doris/pull/19000#issuecomment-1520274269
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] yiguolei merged pull request #19000: [Refactor](exceptionsafe) add factory creator to some class
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #19000:
URL: https://github.com/apache/doris/pull/19000
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #19000: [Refactor](exceptionsafe) add factory creator to some class
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19000:
URL: https://github.com/apache/doris/pull/19000#issuecomment-1521032793
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #19000: [Refactor](exceptionsafe) add factory creator to some class
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19000:
URL: https://github.com/apache/doris/pull/19000#issuecomment-1521071446
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] yiguolei commented on pull request #19000: [Refactor](exceptionsafe) add factory creator to some class
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on PR #19000:
URL: https://github.com/apache/doris/pull/19000#issuecomment-1521033146
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #19000: [Refactor](exceptionsafe) add factory creator to some class
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19000:
URL: https://github.com/apache/doris/pull/19000#issuecomment-1521081067
PR approved by anyone and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] yiguolei commented on pull request #19000: [Refactor](exceptionsafe) add factory creator to some class
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on PR #19000:
URL: https://github.com/apache/doris/pull/19000#issuecomment-1521080692
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #19000: [Refactor](exceptionsafe) add factory creator to some class
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19000:
URL: https://github.com/apache/doris/pull/19000#issuecomment-1519654436
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #19000: [Refactor](exceptionsafe) add factory creator to some class
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19000:
URL: https://github.com/apache/doris/pull/19000#issuecomment-1521081043
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] yiguolei commented on a diff in pull request #19000: [Refactor](exceptionsafe) add factory creator to some class
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on code in PR #19000:
URL: https://github.com/apache/doris/pull/19000#discussion_r1175122379
##########
be/src/vec/exec/scan/vfile_scanner.cpp:
##########
@@ -574,40 +574,40 @@ Status VFileScanner::_get_next_reader() {
// TODO: use data lake type
switch (_params.format_type) {
case TFileFormatType::FORMAT_PARQUET: {
- ParquetReader* parquet_reader =
- new ParquetReader(_profile, _params, range, _state->query_options().batch_size,
- const_cast<cctz::time_zone*>(&_state->timezone_obj()),
- _io_ctx.get(), _state, _kv_cache);
+ std::unique_ptr<ParquetReader> parquet_reader = ParquetReader::create_unique(
+ _profile, _params, range, _state->query_options().batch_size,
+ const_cast<cctz::time_zone*>(&_state->timezone_obj()), _io_ctx.get(), _state,
+ _kv_cache);
RETURN_IF_ERROR(parquet_reader->open());
if (!_is_load && _push_down_expr == nullptr && _vconjunct_ctx != nullptr) {
RETURN_IF_ERROR(_vconjunct_ctx->clone(_state, &_push_down_expr));
_discard_conjuncts();
}
if (range.__isset.table_format_params &&
range.table_format_params.table_format_type == "iceberg") {
- IcebergTableReader* iceberg_reader =
- new IcebergTableReader((GenericReader*)parquet_reader, _profile, _state,
- _params, range, _kv_cache, _io_ctx.get());
+ std::unique_ptr<IcebergTableReader> iceberg_reader =
+ IcebergTableReader::create_unique(parquet_reader.get(), _profile, _state,
Review Comment:
这里应该不对, 在577 行是一个unique ptr,结果iceberg reader 拿到的是裸指针,然后再596 行返回了,所以577 行的unique ptr 会析构调对象,就core了。
你可以再589 行,用 std::move 把 parquet reader move 到iceberg reader 的构造方法里。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org