Support `HeartbeatConsistencyChecks` in `Clone()` by mgravell · Pull Request #2658 · StackExchange/StackExchange.Redis

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@mgravell

Copy link Copy Markdown

Collaborator

@mgravell mgravell commented

Feb 27, 2024

edited

Loading

release 2.7.23 added a ConfigurationOptions.HeartbeatConsistencyChecks option, but that option is not represented in Clone(); fix that

@NickCraver

Copy link Copy Markdown

Collaborator

Sooooooo I think I missed this because interval isn't in there either…

@NickCraver

Copy link Copy Markdown

Collaborator

Thoughts on some reflection-based test for clone checking to prevent future misses?

@mgravell

Copy link Copy Markdown

Collaborator Author

Sooooooo I think I missed this because interval isn't in there either…

added; I have no great ideas on the reflection thing - feel free to suggest

@mgravell

Copy link Copy Markdown

Collaborator Author

maybe just a count of the fields on ConfigurationOptions with a known expected value:

Assert.Equals(43, fields.Length); // if this fails, check Clone() has been updated
NickCraver reacted with thumbs up emoji

@NickCraver

Copy link Copy Markdown

Collaborator

+1 I like it - simple and effective we can get fancier if ever justified. Do you mind adding in this PR please? If slammed I can follow-up later in day too.

@mgravell

Copy link Copy Markdown

Collaborator Author

@NickCraver already working on it

@mgravell

Copy link Copy Markdown

Collaborator Author

Copy link Copy Markdown

Collaborator

@NickCraver NickCraver left a comment

Choose a reason for hiding this comment

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

Looking good 👍

@mgravell mgravell merged commit a517561 into main

Feb 27, 2024

@mgravell mgravell deleted the heartbeat-clone branch

February 27, 2024 15:41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@NickCraver NickCraver NickCraver approved these changes

+2 more reviewers

@niewiadomo202 niewiadomo202 niewiadomo202 left review comments

@tim2346 tim2346 tim2346 left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@mgravell @NickCraver @niewiadomo202 @tim2346