fix(dolt): server mode should support multi-process access
Code review fix: In server mode, Dolt connects to an external sql-server and should NOT be single-process-only. The whole point of server mode is to enable multi-writer access. Changes: - Add Config.GetCapabilities() method that considers server mode - Update daemon_guard, daemon_autostart, daemons, main to use GetCapabilities() - Add TestGetCapabilities test - Update init command help text to document server mode flags The existing CapabilitiesForBackend(string) is kept for backward compatibility but now includes a note to use Config.GetCapabilities() when the full config is available. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -623,13 +623,14 @@ var rootCmd = &cobra.Command{
|
||||
debug.Logf("wisp operation detected, using direct mode")
|
||||
}
|
||||
|
||||
// Dolt backend (embedded) is single-process-only; never use daemon/RPC.
|
||||
// Embedded Dolt is single-process-only; never use daemon/RPC.
|
||||
// (Dolt server mode supports multi-process and won't trigger this.)
|
||||
// This must be checked after dbPath is resolved.
|
||||
if !noDaemon && singleProcessOnlyBackend() {
|
||||
noDaemon = true
|
||||
daemonStatus.AutoStartEnabled = false
|
||||
daemonStatus.FallbackReason = FallbackSingleProcessOnly
|
||||
daemonStatus.Detail = "backend is single-process-only (dolt): daemon mode disabled; using direct mode"
|
||||
daemonStatus.Detail = "backend is single-process-only (embedded dolt): daemon mode disabled; using direct mode"
|
||||
debug.Logf("single-process backend detected, using direct mode")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user