Skip to content

[KODO-15365] 修复偶发性无法停止任务的 BUG #580

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 6 commits into from
Jun 22, 2022

Conversation

yinxulai
Copy link
Collaborator

@yinxulai yinxulai commented Jun 20, 2022

问题

原因分析

  • 未正确处理 pool 中未执行到的 uploadChuck

@yinxulai yinxulai added the bug Something isn't working. label Jun 20, 2022
@yinxulai yinxulai self-assigned this Jun 20, 2022
@yinxulai yinxulai requested a review from lzfee0227 June 20, 2022 10:23
2788
2788 previously approved these changes Jun 21, 2022
Copy link

@2788 2788 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

(chunkInfo: ChunkInfo) => this.uploadChunk(chunkInfo),
async (chunkInfo: ChunkInfo) => {
if (this.aborted) return
await this.uploadChunk(chunkInfo)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIP: 好像 await 没啥作用

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有作用,当 catch 的时候需要抛错误给 Pool

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

跟直接 return 有啥区别

Copy link
Collaborator

@lzfee0227 lzfee0227 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment on lines +96 to +98
if (this.aborted) {
pool.abort()
throw new Error('pool is aborted')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIP: 丑陋是真的丑陋

@yinxulai yinxulai merged commit e180bea into qiniu:master Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants