feat: Update machinery to v1.10.13 and optimize Redis connection pool for weak network conditions #4072
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces updates to dependency versions, refines Redis configuration defaults, and modifies task group handling to improve performance and maintainability. The most notable changes include upgrading the
dragonflyoss/machinery
dependency, updating Redis-related constants, and adjusting task group timeout values.Dependency Updates:
dragonflyoss/machinery
to versionv1.10.13
ingo.mod
for compatibility and bug fixes.Redis Configuration Enhancements:
internal/job/constants.go
:DefaultRedisMaxIdle
to0
and introducedDefaultRedisMaxActive
with a value of300
.DefaultRedisIdleTimeout
to30
seconds.DefaultRedisNormalTasksPollPeriod = 2000
) and delayed tasks (DefaultRedisDelayedTasksPollPeriod = 500
).internal/job/job.go
.Task Group Timeout Adjustments:
SendGroupWithContext
calls from0
to50
across multiple functions to improve task group handling:createGroupJob
inmanager/job/preheat.go
.CreateGetTask
inmanager/job/task.go
.CreateDeleteTask
inmanager/job/task.go
.Related Issue
Motivation and Context
Screenshots (if appropriate)
Types of changes
Checklist