mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-04 09:30:38 -06:00
extra debug info
This commit is contained in:
@@ -71,6 +71,7 @@ const sqlServerHeartbeatIntervalEnvVar = "DOLT_SQL_SERVER_HEARTBEAT_INTERVAL"
|
||||
var ExternalDisableUsers bool = false
|
||||
|
||||
var ErrCouldNotLockDatabase = goerrors.NewKind("database \"%s\" is locked by another dolt process; either clone the database to run a second server, or stop the dolt process which currently holds an exclusive write lock on the database")
|
||||
var ErrCouldNotLockDatabaseWithDir = goerrors.NewKind("datadir: \"%s\", database \"%s\" is locked by another dolt process; either clone the database to run a second server, or stop the dolt process which currently holds an exclusive write lock on the database")
|
||||
|
||||
// Serve starts a MySQL-compatible server. Returns any errors that were encountered.
|
||||
func Serve(
|
||||
@@ -180,7 +181,7 @@ func ConfigureServices(
|
||||
InitF: func(ctx context.Context) (err error) {
|
||||
return mrEnv.Iter(func(name string, dEnv *env.DoltEnv) (stop bool, err error) {
|
||||
if dEnv.IsAccessModeReadOnly() {
|
||||
return true, ErrCouldNotLockDatabase.New(name)
|
||||
return true, ErrCouldNotLockDatabaseWithDir.New(name, serverConfig.DataDir())
|
||||
}
|
||||
return false, nil
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user