1
0

[HUDI-2959] Fix the thread leak of cleaning service (#4252)

This commit is contained in:
Danny Chan
2021-12-11 12:08:47 +08:00
committed by GitHub
parent 9797fdfbb2
commit 9bdcee00c0
5 changed files with 31 additions and 38 deletions

View File

@@ -281,7 +281,11 @@ public class HoodieFlinkWriteClient<T extends HoodieRecordPayload> extends
* checkpoint finish.
*/
public void startAsyncCleaning() {
this.asyncCleanerService = AsyncCleanerService.startAsyncCleaningIfEnabled(this);
if (this.asyncCleanerService == null) {
this.asyncCleanerService = AsyncCleanerService.startAsyncCleaningIfEnabled(this);
} else {
this.asyncCleanerService.start(null);
}
}
/**