Kill gorp (#19786)
* Kill gorp Gorp is dead. Long live Gorp. ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c3ec0a145b
Коммит
4da98cb51a
@@ -180,7 +180,7 @@ func (h *MainHelper) PreloadMigrations() {
|
||||
panic(fmt.Errorf("cannot read file: %v", err))
|
||||
}
|
||||
}
|
||||
handle := h.SQLStore.GetMaster()
|
||||
handle := h.SQLStore.GetMasterX()
|
||||
_, err = handle.Exec(string(buf))
|
||||
if err != nil {
|
||||
panic(errors.Wrap(err, "Error preloading migrations. Check if you have &multiStatements=true in your DSN if you are using MySQL. Or perhaps the schema changed? If yes, then update the warmup files accordingly"))
|
||||
@@ -271,7 +271,7 @@ func (h *MainHelper) SetReplicationLagForTesting(seconds int) error {
|
||||
}
|
||||
|
||||
func (h *MainHelper) execOnEachReplica(query string, args ...interface{}) error {
|
||||
for _, replica := range h.SQLStore.Replicas {
|
||||
for _, replica := range h.SQLStore.ReplicaXs {
|
||||
_, err := replica.Exec(query, args...)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Ссылка в новой задаче
Block a user