Skip to content

Conversation

gaius-qi
Copy link
Member

Description

This pull request introduces updates to Redis configuration defaults and enhancements to Redis connection pool management across the codebase. The changes include adjustments to default Redis connection settings, the addition of new configuration options (PoolSize and PoolTimeout), and updates to relevant test cases and configuration files.

Redis Configuration Updates:

  • internal/job/constants.go: Reduced DefaultRedisMaxIdle from 10 to 5 and DefaultRedisMaxActive from 50 to 20 to optimize resource usage.
  • manager/config/constants.go: Added defaults for DefaultRedisPoolSize (20) and DefaultRedisPoolTimeout (10 seconds) and reduced DefaultLFUCacheSize from 10,000 to 8,000. [1] [2]

New Redis Connection Pool Options:

  • manager/config/config.go: Introduced PoolSize and PoolTimeout fields in the RedisConfig struct to allow configuration of the Redis connection pool. These fields were also initialized with default values in the New() function. [1] [2]
  • manager/cache/cache.go: Updated the New function to pass the new PoolSize and PoolTimeout options to the Redis client configuration.

Test and Configuration File Updates:

Related Issue

Motivation and Context

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@gaius-qi gaius-qi added this to the v2.3.0 milestone May 20, 2025
@gaius-qi gaius-qi self-assigned this May 20, 2025
@gaius-qi gaius-qi requested a review from a team as a code owner May 20, 2025 04:15
@gaius-qi gaius-qi added the enhancement New feature or request label May 20, 2025
Signed-off-by: Gaius <gaius.qi@gmail.com>
Copy link
Member

@chlins chlins left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

@Liam-Zhao Liam-Zhao left a comment

Choose a reason for hiding this comment

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

LGTM

@chlins chlins enabled auto-merge (squash) May 20, 2025 04:30
@gaius-qi gaius-qi disabled auto-merge May 20, 2025 04:30
@gaius-qi gaius-qi merged commit cee86a5 into main May 20, 2025
20 of 25 checks passed
@gaius-qi gaius-qi deleted the feature/pool branch May 20, 2025 04:30
gaius-qi added a commit that referenced this pull request May 20, 2025
Signed-off-by: Gaius <gaius.qi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants