Skip to content
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

fix: create task when waiting #352

Merged
merged 1 commit into from
Nov 11, 2022
Merged

fix: create task when waiting #352

merged 1 commit into from
Nov 11, 2022

Conversation

elrrrrrrr
Copy link
Member

下游同步 cnpmcore 项目时,cnpmcore 会同时发送 [version, tag] 两个独立的事件
有可能下游在处理 version change 时,tag 尚未创建完成
但由于 task targetName 幂等,导致 tag 的 change 事件未响应,造成 tag 异常

  • 创建同步任务时进行判断,如果任务还未开始才放弃创建

Copy link
Member

@fengmk2 fengmk2 left a comment

Choose a reason for hiding this comment

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

CI 需要修一下。

@codecov
Copy link

codecov bot commented Nov 11, 2022

Codecov Report

Merging #352 (2ab2d15) into main (5965dbd) will decrease coverage by 0.28%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #352      +/-   ##
==========================================
- Coverage   95.97%   95.68%   -0.29%     
==========================================
  Files         148      148              
  Lines        4499     4498       -1     
  Branches      389      388       -1     
==========================================
- Hits         4318     4304      -14     
- Misses        181      194      +13     
Impacted Files Coverage Δ
app/core/service/TaskService.ts 97.22% <100.00%> (-1.41%) ⬇️
config/config.default.ts 75.75% <0.00%> (-15.16%) ⬇️
app/infra/NFSClientAdapter.ts 74.07% <0.00%> (-14.82%) ⬇️
app/port/controller/BinarySyncController.ts 92.30% <0.00%> (-5.13%) ⬇️
app/common/adapter/NFSAdapter.ts 96.66% <0.00%> (-3.34%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@fengmk2 fengmk2 merged commit 7eb209d into main Nov 11, 2022
@fengmk2 fengmk2 deleted the duplicate-task branch November 11, 2022 10:31
@fengmk2
Copy link
Member

fengmk2 commented Nov 11, 2022

2.5.2

fengmk2 pushed a commit that referenced this pull request Feb 14, 2023
> 相同任务并发执行时,如果上游有 changesStream 事件,可能会导致版本被错误删除。
* 撤销 #352 的变更,我们已在
#361 中解决了事件实时性问题

------------

> Concurrent execution of the same task with changesStream events may
cause versions to be deleted incorrectly.
* revert #352, since we have fixed
in #361
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants