fix: set sync.mode=dolt-native in DB during bd migrate --to-dolt (dolt-test-cb6x)
Without this, ShouldExportJSONL defaults to git-portable mode after migration, causing 10-25s JSONL export on every bd write operation. Discovered by gastown/max via gt-dookzl investigation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Executed-By: beads/crew/emma Rig: beads Role: crew
This commit is contained in:
parent
153aaf889f
commit
f23e2afb6b
1 changed files with 9 additions and 0 deletions
|
|
@ -139,6 +139,15 @@ func handleToDoltMigration(dryRun bool, autoYes bool) {
|
|||
exitWithError("import_failed", importErr.Error(), "partial Dolt directory has been cleaned up")
|
||||
}
|
||||
|
||||
// Set sync.mode to dolt-native in the DB so ShouldExportJSONL skips
|
||||
// the expensive JSONL export. Without this, the migrated DB has no
|
||||
// sync.mode set, defaulting to git-portable (10-25s export tax per write).
|
||||
if err := doltStore.SetConfig(ctx, SyncModeConfigKey, SyncModeDoltNative); err != nil {
|
||||
printWarning(fmt.Sprintf("failed to set sync.mode in DB: %v", err))
|
||||
} else {
|
||||
printSuccess("Set sync.mode = dolt-native in database")
|
||||
}
|
||||
|
||||
// Commit the migration
|
||||
commitMsg := fmt.Sprintf("Migrate from SQLite: %d issues imported", imported)
|
||||
if err := doltStore.Commit(ctx, commitMsg); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue