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

Added support for running MongoDB queries on secondary in replicaset mode #1424

Merged
merged 7 commits into from
Jan 23, 2020

Conversation

erans
Copy link
Contributor

@erans erans commented Nov 23, 2016

No description provided.

…tabase (for example, secondaryPreferred - to try and read data from secondary before primary).

- Removed old code that used MongoClientReplicaSet as it is now just a reference to MongoClient
- Fixed a documentation type :-)
@SebC99
Copy link

SebC99 commented Sep 2, 2019

Why is this PR still open? Is there any other way to set the mongodb read preference in redash?

@erans
Copy link
Contributor Author

erans commented Sep 2, 2019

Not sure why this hasn't been merged before. The main different is adding the "readPreference" flag so that by default, if there is a replicaSet configured you can tell it to prefer reading data from the replicaSets that are not the current master.

I've merged some minor conflicts that were there since this is a super old PR.

@ilkarataev
Copy link

ilkarataev commented Jan 22, 2020

What about this pull request?Would be it solved?

@erans
Copy link
Contributor Author

erans commented Jan 22, 2020

I've fixed the conflicts and I think it should be merged.

@arikfr
Copy link
Member

arikfr commented Jan 23, 2020

@erans thanks for updating this PR. But it looks like readPreference is no longer used after the update with latest master?

Copy link
Contributor Author

@erans erans left a comment

Choose a reason for hiding this comment

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

Please review again and (hopefully merge). I think 3.5 years is long enough :-P

@arikfr arikfr merged commit 7d11fae into getredash:master Jan 23, 2020
@arikfr
Copy link
Member

arikfr commented Jan 23, 2020

Congrats! That's my birthday gift for you 🎁

@erans
Copy link
Contributor Author

erans commented Jan 23, 2020 via email

'replicaSetName': {
'type': 'string',
'title': 'Replica Set Name'
},
Copy link
Member

Choose a reason for hiding this comment

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

@arikfr I'm wondering why restyled didn't catch this change of style if black would have turned the single quotes into double quotes?

Copy link
Member

Choose a reason for hiding this comment

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

🤷 no idea.

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.

5 participants