-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add DB replica support #602
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this one :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
@jespino @mgdelacroix @wiggin77 are we ok merging this one ? |
server/store/sqlstore/migrations.go
Outdated
@@ -37,7 +37,7 @@ const ( | |||
|
|||
func (s *SQLStore) runMSTeamUserIDDedup() error { | |||
// get all users with duplicate msteamsuserid | |||
rows, err := s.getQueryBuilder().Select( | |||
rows, err := s.getMasterQueryBuilder().Select( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is master needed here for a SELECT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wiggin77 I assumed is needed as this is a migration to avoid any sort of lag. I can change it to use the replica if you think is best
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change it to use the replica and then merge.. if this causes issues we can always switch to use master again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! 👍 One item for consideration re using master for a select where replication lag would not be a factor.
/update-branch |
Summary
Adds Database read replica support when available
Ticket Link
https://mattermost.atlassian.net/browse/MM-57139