* add SelectBuilderCtx; change the few calls where it's appropriate to use
* tests (wip)
* tests improved
* use SelectCtx's own WithTimeout
* improve tests based on PR feedback
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Drop the legacy `X` suffix from `GetMasterX` and `GetReplicaX`. The
presence of the suffix suggests there's a `non-X` version: but in fact
we migrated these away a long time ago, so remove the cognitive
overhead.
As an aside, this additionally helps avoid trip up LLMs that interpret
this as "something to fix".
It was a good decision in hindsight to keep the public module as 0.x
because this would have been a breaking change again.
https://mattermost.atlassian.net/browse/MM-53032
```release-note
Changed the Go module path from github.com/mattermost/mattermost-server/server/v8 to github.com/mattermost/mattermost/server/v8.
For the public facing module, it's path is also changed from github.com/mattermost/mattermost-server/server/public to github.com/mattermost/mattermost/server/public
```
We monitor the health of DB replicas, and on a fatal error,
take them out of the pool.
On a separate goroutine, we keep pinging the unhealthy replicas,
and on getting a good response back, we add them back to the pool.
https://mattermost.atlassian.net/browse/MM-50427
```release-note
Mattermost is now resilient against DB replica outages and will
dynamically choose a replica if it's alive.
Also added a config parameter ReplicaMonitorIntervalSeconds
whose default value is 5. This controls how frequently unhealthy
replicas will be monitored for liveness check.
```
Co-authored-by: Mattermost Build <build@mattermost.com>
https://mattermost.atlassian.net/browse/MM-52079
```release-note
We upgrade the module version to 8.0. The new module path is github.com/mattermost-server/server/v8.
```
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>