Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

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

CSHARP-5494: Deprecate Hedged Reads options #1615

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

Merged
papafe merged 2 commits into mongodb:main from papafe:csharp5494
Mar 11, 2025
Merged

Conversation

@papafe
Copy link
Contributor

@papafe papafe commented Feb 18, 2025

No description provided.

@papafe papafe requested a review from a team as a code owner February 18, 2025 10:47
@papafe papafe requested review from JamesKovacs and adelinowona and removed request for a team and JamesKovacs February 18, 2025 10:47
Copy link
Contributor

@adelinowona adelinowona left a comment

Choose a reason for hiding this comment

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

I think we expose the hedged options in the readPreference options using the ReadPreferenceHedge class. Should we deprecate that as well?

Copy link
Contributor Author

papafe commented Feb 22, 2025

I think we expose the hedged options in the readPreference options using the ReadPreferenceHedge class. Should we deprecate that as well?

🤦 Thanks a lot for noticing, I'll take a look

Copy link
Contributor

@adelinowona adelinowona left a comment

Choose a reason for hiding this comment

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

Hmmm seeing all the warnings suppression is a bit ugly but I am not sure if there's another way to do this. We could add the suppression at the top of the file but I doubt we want to do that since it's best to know exactly what in a file you are suppressing than suppressing the whole file. cc @BorisDog

Copy link
Contributor

@BorisDog BorisDog left a comment

Choose a reason for hiding this comment

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

I think we should stick with the current approach for warnings suppression. It's not the most convenient option, but is the safest. As we don't want to ignore things we don't want to ignore :)

ReadPreferenceMode mode,
IEnumerable<TagSet> tagSets = null,
TimeSpan? maxStaleness = null,
#pragma warning disable CS0618 // Type or member is obsolete
Copy link
Contributor

@BorisDog BorisDog Mar 7, 2025

Choose a reason for hiding this comment

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

Will using this constructor without the hedge parameter, generate an obsolete warning?
If so, we should probably provide a new ctor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it will generate an obsolete warning only when passing the hedge parameter.

@papafe papafe requested a review from BorisDog March 11, 2025 18:11
@papafe papafe merged commit 37ed2a8 into mongodb:main Mar 11, 2025
25 of 30 checks passed
@sanych-sun sanych-sun added the maintenance Non-code maintenance (deps, docs, configs, etc.). label Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adelinowona adelinowona adelinowona requested changes

@BorisDog BorisDog Awaiting requested review from BorisDog

Assignees

No one assigned

Labels

maintenance Non-code maintenance (deps, docs, configs, etc.).

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /