extra debug info

This commit is contained in:
Brian Hendriks
2024-05-15 11:50:58 -07:00
parent 2e6b5a5452
commit 2df73a6aa0

View File

@@ -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
})