Skip to content

Commit 0cc7930

Browse files
committed
Be more verbose about progress
1 parent 1308c46 commit 0cc7930

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ipfs-8-to-9/migration/swapper.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ import (
1414
)
1515

1616
// SyncSize specifies how much we batch data before committing and syncing.
17-
var SyncSize uint64 = 10 * 1024 * 1024 // 10MiB
17+
var SyncSize uint64 = 20 * 1024 * 1024 // 20MiB
1818

19-
// NWorkers sets the number of swapping threads to run.
19+
// NWorkers sets the number of swapping threads to run when applying a
20+
// migration.
2021
var NWorkers int = 4
2122

2223
// Swap holds the datastore keys for the original CID and for the
@@ -260,6 +261,7 @@ func (sw *swapWorker) swap(old, new ds.Key) error {
260261
}
261262

262263
func (sw *swapWorker) sync() error {
264+
log.Log("Syncing after %d objects migrated", sw.swapped)
263265
// Sync all the new keys to disk
264266
err := sw.store.Sync(sw.syncPrefix)
265267
if err != nil {

0 commit comments

Comments
 (0)