-
Notifications
You must be signed in to change notification settings - Fork 201
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: file-worker任务状态更新请求无序到达导致第三方源文件偶现分发失败 #2434 #2443
fix: file-worker任务状态更新请求无序到达导致第三方源文件偶现分发失败 #2434 #2443
Conversation
jsonwan
commented
Sep 13, 2023
- 任务状态更新支持事务与写入锁定,保证多条关联数据更新的原子性;
- 优化文件下载任务表索引;
- DAO层代码全部改用声明式事务;
- 删除部分未使用的冗余代码;
- 优化file-worker线程池配置,增加监控。
212b789
to
544e686
Compare
@@ -58,8 +58,7 @@ public class FileSourceServiceImpl implements FileSourceService { | |||
|
|||
@Autowired | |||
public FileSourceServiceImpl(FileSourceTypeDAO fileSourceTypeDAO, | |||
FileSourceDAO fileSourceDAO, | |||
FileWorkerDAO fileWorkerDAO) { | |||
FileSourceDAO fileSourceDAO, FileWorkerDAO fileWorkerDAO) { |
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.
换行有点奇怪
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.
已修改
FileWorkerDAO fileworkerDAO, | ||
FileSourceDAO fileSourceDAO, | ||
DispatchService dispatchService, | ||
FileTaskDAO fileTaskDAO, FileWorkerDAO fileworkerDAO, |
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.
换行格式
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.
已修改
@@ -121,6 +120,7 @@ public TaskInfoDTO startFileSourceDownloadTask(String username, Long appId, Long | |||
fileSourceId, filePathList, null); | |||
} | |||
|
|||
@Transactional(rollbackFor = {Throwable.class}) |
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.
@transactional 需要value 属性指定TransactionManager(轻量化部署不指定的情况下会报错))
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.
已修改
@@ -240,50 +240,55 @@ private void notifyFileTaskStatusChangeListeners(FileTaskDTO fileTaskDTO, FileSo | |||
} | |||
|
|||
@Override | |||
@Transactional(rollbackFor = {Throwable.class}) |
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.
@transactional 需要value 属性指定TransactionManager(轻量化部署不指定的情况下会报错))
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.
已修改
@@ -51,8 +51,7 @@ public class FileSourceTaskStatusUpdater implements FileTaskStatusChangeListener | |||
|
|||
@Autowired | |||
public FileSourceTaskStatusUpdater(FileSourceTaskDAO fileSourceTaskDAO, | |||
FileTaskDAO fileTaskDAO, | |||
FileSourceTaskStatusChangeListener listener) { | |||
FileTaskDAO fileTaskDAO, FileSourceTaskStatusChangeListener listener) { |
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.
换行格式
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.
已修改