Skip to content

Refresh client pools when application secure mode changes - #204

Open
bihaoxwork wants to merge 1 commit into
masterfrom
fix/refresh-pools-on-secure-mode-change
Open

bihaoxwork wants to merge 1 commit into
masterfrom
fix/refresh-pools-on-secure-mode-change

Conversation

@bihaoxwork

Copy link
Copy Markdown
Contributor

Changing <APP>.use.secure at runtime can leave existing clients connected to the old port because EVCacheClientPool does not subscribe to this setting. Subscribe to the application property, with the existing evcache.use.secure fallback and false default, and clear and force-refresh the pool when its effective value changes. This uses the same rebuild behavior as timeout and pool-size changes.

The change covers application-level and global secure-mode changes. Discovery continues to apply server-group overrides; changes made only to those overrides do not gain a new subscription in this PR.

Validation:

  • Added five regression tests covering disabling and enabling secure mode, cleanup of all replica clients, global fallback updates, removal of an application override, and precedence over global changes. The four refresh-triggering cases fail before the fix and all five pass after it.
  • Ran the complete core test suite with Java 17: ./gradlew :evcache-core:test --no-daemon --console=plain.

This branch has not been deployed

No deployments
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.

1 participant