Skip to content

[fix](export) remove export task executor in TransientTaskExecutor (#42880)#42950

Merged
morningman merged 1 commit intoapache:masterfrom
morningman:master_bp42880
Oct 31, 2024
Merged

[fix](export) remove export task executor in TransientTaskExecutor (#42880)#42950
morningman merged 1 commit intoapache:masterfrom
morningman:master_bp42880

Conversation

@morningman
Copy link
Contributor

cherry-pick #42880

…pache#42880)

### What problem does this PR solve?

Problem Summary:

There is a memory leak on FE side when continue running `export`
command.
The `ExportTaskExecutor` instances will be added to
`TransientTaskManager` and never be removed.

This PR mainly changes:
1. Remove unused `ExportTaskRegister` in `Env`.
2. Remove `ExportTaskExecutor` from `TransientTaskManager` once export
job is finished or cancelled.

### Release note

Fix FE memory leak by removing `ExportTaskExecutor` from
`TransientTaskManager` once export job is finished or cancelled.
@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@morningman
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 31, 2024
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@morningman morningman merged commit 20e07b7 into apache:master Oct 31, 2024
morningman added a commit that referenced this pull request Nov 1, 2024
### What problem does this PR solve?

Related PR: #42950

Problem Summary:

PR #42950 change some logic in ExportJob, by removing the
`taskIdToExecutor`, which is
a thread safe ConcurrentHashMap.
But there is a problem that, when cancelling a export job, it will clear
the `jobExecutorList` in ExportJob,
and meanwhile, this `jobExecutorList` may being traversed when creating
the export job,
causing concurrent modification exception.

This PR fix it by locking the writeLock of ExportMgr when cancelling the
export job.
github-actions bot pushed a commit that referenced this pull request Nov 1, 2024
### What problem does this PR solve?

Related PR: #42950

Problem Summary:

PR #42950 change some logic in ExportJob, by removing the
`taskIdToExecutor`, which is
a thread safe ConcurrentHashMap.
But there is a problem that, when cancelling a export job, it will clear
the `jobExecutorList` in ExportJob,
and meanwhile, this `jobExecutorList` may being traversed when creating
the export job,
causing concurrent modification exception.

This PR fix it by locking the writeLock of ExportMgr when cancelling the
export job.
morningman added a commit to morningman/doris that referenced this pull request Nov 6, 2024
…he#43051)

### What problem does this PR solve?

Related PR: apache#42950

Problem Summary:

PR apache#42950 change some logic in ExportJob, by removing the
`taskIdToExecutor`, which is
a thread safe ConcurrentHashMap.
But there is a problem that, when cancelling a export job, it will clear
the `jobExecutorList` in ExportJob,
and meanwhile, this `jobExecutorList` may being traversed when creating
the export job,
causing concurrent modification exception.

This PR fix it by locking the writeLock of ExportMgr when cancelling the
export job.
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.1.7-merged dev/3.0.3-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments