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

there is an evident BUG in Query.java line 245 ( getReadPreference method) #4639

Closed
baggior opened this issue Feb 16, 2024 · 1 comment
Closed
Labels
status: invalid An issue that we don't feel is valid

Comments

@baggior
Copy link

baggior commented Feb 16, 2024

return getMeta().getFlags().contains(CursorOption.SECONDARY_READS) ? ReadPreference.primaryPreferred() : null;

in method
public ReadPreference getReadPreference()

return getMeta().getFlags().contains(CursorOption.SECONDARY_READS) ? ReadPreference.primaryPreferred() : null;

I think should be

return getMeta().getFlags().contains(CursorOption.SECONDARY_READS) ? ReadPreference.secondaryPreferred() : null;

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 16, 2024
@christophstrobl
Copy link
Member

thank you for getting in touch - secondaryPreferred() forces reads to a secondary where as primaryPreferred() allows reads from secondary which is in line with what CursorOption.SECONDARY_READS says.

@christophstrobl christophstrobl closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2024
@christophstrobl christophstrobl added status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

3 participants