mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-28 10:46:21 -06:00
Merge pull request #5398 from dolthub/andy/no-scan-parallelism-2
go/commands/engine: get NBF from database provider
This commit is contained in:
@@ -86,6 +86,15 @@ func NewSqlEngine(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
nbf := types.Format_Default
|
||||
if len(dbs) > 0 {
|
||||
nbf = dbs[0].DbData().Ddb.Format()
|
||||
}
|
||||
parallelism := runtime.GOMAXPROCS(0)
|
||||
if types.IsFormat_DOLT(nbf) {
|
||||
parallelism = 1
|
||||
}
|
||||
|
||||
bThreads := sql.NewBackgroundThreads()
|
||||
dbs, err = dsqle.ApplyReplicationConfig(ctx, bThreads, mrEnv, cli.CliOut, dbs...)
|
||||
if err != nil {
|
||||
@@ -132,11 +141,6 @@ func NewSqlEngine(
|
||||
}
|
||||
|
||||
// Set up engine
|
||||
parallelism := runtime.GOMAXPROCS(0)
|
||||
if types.IsFormat_DOLT(types.Format_Default) {
|
||||
parallelism = 1
|
||||
}
|
||||
|
||||
engine := gms.New(analyzer.NewBuilder(pro).WithParallelism(parallelism).Build(), &gms.Config{
|
||||
IsReadOnly: config.IsReadOnly,
|
||||
IsServerLocked: config.IsServerLocked,
|
||||
|
||||
Reference in New Issue
Block a user