-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](pipeline) Crashing caused by repeated spill operations #56755
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| // Licensed to the Apache Software Foundation (ASF) under one | ||
| // or more contributor license agreements. See the NOTICE file | ||
| // distributed with this work for additional information | ||
| // regarding copyright ownership. The ASF licenses this file | ||
| // to you under the Apache License, Version 2.0 (the | ||
| // "License"); you may not use this file except in compliance | ||
| // with the License. You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, | ||
| // software distributed under the License is distributed on an | ||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| // KIND, either express or implied. See the License for the | ||
| // specific language governing permissions and limitations | ||
| // under the License. | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <memory> | ||
| #include <string> | ||
|
|
||
| #include "common/status.h" | ||
| #include "pipeline/dependency.h" | ||
| #include "pipeline/exec/operator.h" | ||
| #include "pipeline/exec/spill_utils.h" | ||
| #include "pipeline/pipeline.h" | ||
| #include "pipeline/pipeline_task.h" | ||
| #include "pipeline_task.h" | ||
|
|
||
| namespace doris { | ||
| class RuntimeState; | ||
|
|
||
| namespace pipeline { | ||
| class PipelineFragmentContext; | ||
|
|
||
| class RevokableTask : public PipelineTask { | ||
| public: | ||
| RevokableTask(PipelineTaskSPtr task, std::shared_ptr<SpillContext> spill_context) | ||
| : _task(std::move(task)), _spill_context(std::move(spill_context)) {} | ||
|
|
||
| ~RevokableTask() override = default; | ||
|
|
||
| RuntimeState* runtime_state() const override { return _task->runtime_state(); } | ||
|
|
||
| Status close(Status exec_status, bool close_sink) override { | ||
| return _task->close(exec_status, close_sink); | ||
| } | ||
|
|
||
| Status finalize() override { return _task->finalize(); } | ||
|
|
||
| bool set_running(bool running) override { return _task->set_running(running); } | ||
|
|
||
| bool is_finalized() const override { return _task->is_finalized(); } | ||
|
|
||
| std::weak_ptr<PipelineFragmentContext>& fragment_context() override { | ||
| return _task->fragment_context(); | ||
| } | ||
|
|
||
| PipelineTask& set_thread_id(int thread_id) override { return _task->set_thread_id(thread_id); } | ||
|
|
||
| PipelineId pipeline_id() const override { return _task->pipeline_id(); } | ||
|
|
||
| std::string task_name() const override { return _task->task_name(); } | ||
|
|
||
| Status execute(bool* done) override { return _task->do_revoke_memory(_spill_context); } | ||
|
|
||
| bool is_blockable() const override { return true; } | ||
|
|
||
| private: | ||
| PipelineTaskSPtr _task; | ||
| std::shared_ptr<SpillContext> _spill_context; | ||
| }; | ||
|
|
||
| } // namespace pipeline | ||
| } // namespace doris |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a check for the return value by
compare_exchange_weak