mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-12 11:29:01 -05:00
Adding more logging to help debug remote replication issues in the future
This commit is contained in:
@@ -111,6 +111,8 @@ func (rrd ReadReplicaDatabase) DoltDatabases() []*doltdb.DoltDB {
|
||||
}
|
||||
|
||||
func (rrd ReadReplicaDatabase) PullFromRemote(ctx *sql.Context) error {
|
||||
ctx.GetLogger().Tracef("pulling from remote %s for database %s", rrd.remote.Name, rrd.Name())
|
||||
|
||||
_, headsArg, ok := sql.SystemVariables.GetGlobal(dsess.ReplicateHeads)
|
||||
if !ok {
|
||||
return sql.ErrUnknownSystemVariable.New(dsess.ReplicateHeads)
|
||||
|
||||
@@ -107,6 +107,11 @@ func newReplicaDatabase(ctx context.Context, name string, remoteName string, dEn
|
||||
return ReadReplicaDatabase{}, err
|
||||
}
|
||||
|
||||
if sqlCtx, ok := ctx.(*sql.Context); ok {
|
||||
sqlCtx.GetLogger().Infof(
|
||||
"replication enabled for database '%s' from remote '%s'", name, remoteName)
|
||||
}
|
||||
|
||||
return rrd, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user