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

[release/9.0] Redis distributed cache: add HybridCache usage signal #59886

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jan 15, 2025

Backport of #59543 to release/9.0

/cc @mgravell

Redis distributed cache: add HybridCache usage signal

Add connection usage marker for HybridCache to improve connection metadata / visibility.

Description

{Detail}

We already use "DC" and "OC" markers on RESP connections to provide a non-intrusive signal that Distributed Cache and Output Cache are being used; since HybridCache is a feature on top of IDistributedCache, here we add an additional "HC" token to indicate that a RESP connection is being used for HybridCache.

We do this by using IServiceProvider (changing the internal RedisCacheImpl(...) constructors) to detect HybridCache as a service. We don't need it to be the official HybridCache specifically (as in .AddHybridCache()) - just that a HybridCache exists. There are no public API or dependency changes required.

Customer Impact

Improves connection metadata / visibility, i.e. we know what different Redis connections are being used for.

No API changes. Improves internal metrics.

Regression?

  • Yes
  • No

[If yes, specify the version the behavior has regressed from]

Risk

  • High
  • Medium
  • Low

[Justify the selection above]

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

When servicing release/2.1

  • Make necessary changes in eng/PatchConfig.props

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Jan 15, 2025
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0.x milestone Jan 15, 2025
@jodydonetti
Copy link
Contributor

Hi, how does this signal tweak the connection?
Is there something else 3rd party HybridCache implementers should be aware of?

For example with FusionCache it's totally possible to use RedisCache in our apps without being forced to use that as the L2 of FusionCache, even when using it via the HybridCache adapter: in this case the checks I see here would not be technically "correct".

Can a false detection create problems?

Thanks.

@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Jan 24, 2025
@mgravell
Copy link
Member

mgravell commented Jan 24, 2025

Tactics requested; approved 2025-01-24

@mgravell mgravell added the Servicing-approved Shiproom has approved the issue label Jan 27, 2025
@mgravell
Copy link
Member

Test failures seem to be build/SDK related:

Xunit.Sdk.EqualException: Assert.Equal() Failure
↓ (pos 4)
Expected: 9.0.0
Actual: 9.0.1

@mgravell mgravell added ask-mode This issue / PR is a patch candidate which we will bar-check internally before patching it. feature-caching Includes: StackExchangeRedis and SqlServer distributed caches labels Jan 27, 2025
@mgravell
Copy link
Member

/azp run

@dotnet-policy-service dotnet-policy-service bot removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Jan 30, 2025
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mgravell
Copy link
Member

mgravell commented Feb 4, 2025

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@wtgodbe
Copy link
Member

wtgodbe commented Feb 5, 2025

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mgravell
Copy link
Member

mgravell commented Feb 5, 2025

(crosses fingers)

@wtgodbe
Copy link
Member

wtgodbe commented Feb 5, 2025

(crosses fingers)

Some of the Helix failures in 9.0 should be fixed by a PR I just merged - not sure about the (Build Test: Ubuntu x64) failure here though

@mgravell
Copy link
Member

mgravell commented Feb 6, 2025

target value 8 is obsolete and will be removed in a future release

Go home, CI server; you're drunk

@wtgodbe
Copy link
Member

wtgodbe commented Feb 6, 2025

Ugh, the machine rollout happened last night, which means we need to take a JDK update. #60229 should unblock

@wtgodbe
Copy link
Member

wtgodbe commented Feb 6, 2025

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@wtgodbe
Copy link
Member

wtgodbe commented Feb 6, 2025

Java test failures unrelated

@wtgodbe wtgodbe merged commit 00d293b into release/9.0 Feb 6, 2025
21 of 25 checks passed
@wtgodbe wtgodbe deleted the backport/pr-59543-to-release/9.0 branch February 6, 2025 23:03
@dotnet-policy-service dotnet-policy-service bot modified the milestones: 9.0.x, 9.0.3 Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions ask-mode This issue / PR is a patch candidate which we will bar-check internally before patching it. feature-caching Includes: StackExchangeRedis and SqlServer distributed caches Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants