You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "airborne12 (via GitHub)" <gi...@apache.org> on 2023/07/10 06:15:30 UTC
[GitHub] [doris] airborne12 opened a new pull request, #21668: [Fix](pipeline) close sink when fragment context destructs
airborne12 opened a new pull request, #21668:
URL: https://github.com/apache/doris/pull/21668
## Proposed changes
Issue Number: close #xxx
This PR introduces the following changes:
1. Explicitly close the sink of `_pipeline_map` during the destructor of `FragmentMgr`. This is necessary to ensure that all resources are properly cleaned up.
2. The need for this change arises from the fact that `VOlapTableSink::_send_batch_process` is a background thread that needs to be closed before the destructor is called. Failing to do so could potentially lead to memory leaks or other issues.
## 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] HappenLee commented on a diff in pull request #21668: [Fix](pipeline) Close sink during fragment context destruction
Posted by "HappenLee (via GitHub)" <gi...@apache.org>.
HappenLee commented on code in PR #21668:
URL: https://github.com/apache/doris/pull/21668#discussion_r1257824173
##########
be/src/pipeline/pipeline_fragment_context.cpp:
##########
@@ -707,6 +707,16 @@ Status PipelineFragmentContext::submit() {
}
}
+void PipelineFragmentContext::close_sink() {
+ if (_sink) {
+ if (_prepared) {
Review Comment:
maybe double close sink, the line:726 close one time? rethink the logic ?
--
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] airborne12 commented on a diff in pull request #21668: [Fix](pipeline) Close sink during fragment context destruction
Posted by "airborne12 (via GitHub)" <gi...@apache.org>.
airborne12 commented on code in PR #21668:
URL: https://github.com/apache/doris/pull/21668#discussion_r1258091617
##########
be/src/pipeline/pipeline_fragment_context.cpp:
##########
@@ -707,6 +707,16 @@ Status PipelineFragmentContext::submit() {
}
}
+void PipelineFragmentContext::close_sink() {
+ if (_sink) {
+ if (_prepared) {
Review Comment:
_sink->close method will check _closed flag, so no worry
--
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] dataroaring merged pull request #21668: [Fix](pipeline) Close sink during fragment context destruction
Posted by "dataroaring (via GitHub)" <gi...@apache.org>.
dataroaring merged PR #21668:
URL: https://github.com/apache/doris/pull/21668
--
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 #21668: [Fix](pipeline) Close sink during fragment context destruction
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21668:
URL: https://github.com/apache/doris/pull/21668#issuecomment-1628314275
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] airborne12 commented on pull request #21668: [Fix](pipeline) Close sink during fragment context destruction
Posted by "airborne12 (via GitHub)" <gi...@apache.org>.
airborne12 commented on PR #21668:
URL: https://github.com/apache/doris/pull/21668#issuecomment-1628307698
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] HappenLee commented on a diff in pull request #21668: [Fix](pipeline) Close sink during fragment context destruction
Posted by "HappenLee (via GitHub)" <gi...@apache.org>.
HappenLee commented on code in PR #21668:
URL: https://github.com/apache/doris/pull/21668#discussion_r1257821256
##########
be/src/pipeline/pipeline_fragment_context.cpp:
##########
@@ -707,6 +707,16 @@ Status PipelineFragmentContext::submit() {
}
}
+void PipelineFragmentContext::close_sink() {
+ if (_sink) {
+ if (_prepared) {
+ _sink->close(_runtime_state.get(), Status::RuntimeError("prepare failed"));
+ } else {
+ _sink->close(_runtime_state.get(), Status::OK());
Review Comment:
maybe need dispose status of sink close?
--
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] HappenLee commented on a diff in pull request #21668: [Fix](pipeline) Close sink during fragment context destruction
Posted by "HappenLee (via GitHub)" <gi...@apache.org>.
HappenLee commented on code in PR #21668:
URL: https://github.com/apache/doris/pull/21668#discussion_r1257821256
##########
be/src/pipeline/pipeline_fragment_context.cpp:
##########
@@ -707,6 +707,16 @@ Status PipelineFragmentContext::submit() {
}
}
+void PipelineFragmentContext::close_sink() {
+ if (_sink) {
+ if (_prepared) {
+ _sink->close(_runtime_state.get(), Status::RuntimeError("prepare failed"));
+ } else {
+ _sink->close(_runtime_state.get(), Status::OK());
Review Comment:
maybe need dispose status of sink close?
--
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