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

fix: Prevent multiple SessionCache instances from being created. (#2180) #2186

Merged
merged 1 commit into from Jan 12, 2024

Conversation

tippmar-nr
Copy link
Member

@tippmar-nr tippmar-nr commented Jan 12, 2024

Thank you for submitting a pull request. Please review our contributing guidelines and code of conduct.

Description

Prevents an edge case where multiple SessionCache instances could get created if StackExchange.Redis.ConnectionMultiplexer.CreateMultiplexer() is called multiple times.

Improves resiliency in SessionCache.Cleanup() and adds logging.

Fixes #2180

Author Checklist

  • Unit tests, Integration tests, and Unbounded tests completed
  • Performance testing completed with satisfactory results (if required)

Reviewer Checklist

  • Perform code review
  • Pull request was adequately tested (new/existing tests, performance tests)

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (445f7c2) 81.05% compared to head (a8e7d0a) 81.02%.
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2186      +/-   ##
==========================================
- Coverage   81.05%   81.02%   -0.04%     
==========================================
  Files         396      396              
  Lines       24723    24719       -4     
  Branches     2997     2997              
==========================================
- Hits        20040    20029      -11     
- Misses       3895     3903       +8     
+ Partials      788      787       -1     
Files Coverage Δ
src/Agent/NewRelic/Agent/Core/Agent.cs 71.05% <ø> (-0.19%) ⬇️

... and 2 files with indirect coverage changes

@tippmar-nr tippmar-nr marked this pull request as ready for review January 12, 2024 16:27
@tippmar-nr tippmar-nr requested a review from a team as a code owner January 12, 2024 16:27
@tippmar-nr tippmar-nr changed the title **DRAFT** fix: Prevent multiple SessionCache instances from being created. (#2180) fix: Prevent multiple SessionCache instances from being created. (#2180) Jan 12, 2024
Copy link
Member

@chynesNR chynesNR left a comment

Choose a reason for hiding this comment

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

I don't think this will hurt anything, but I also suspect this won't address the issue we're seeing.

@tippmar-nr tippmar-nr merged commit 08a3015 into main Jan 12, 2024
78 checks passed
@tippmar-nr tippmar-nr deleted the fix/redis-session-cache branch January 12, 2024 20:45
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.

StackExchangeRedis2PlusWrapper can create multiple SessionCache instances
4 participants