fix minor issues in migration.
- aborting the initialization cancels the AcquireShard context, but the DAG store would not release the shard (fixed in filecoin-project/dagstore) - off by one error in console output.
This commit is contained in:
@@ -575,6 +575,7 @@ func (sm *StorageMinerAPI) DagstoreListShards(ctx context.Context) ([]api.Dagsto
|
||||
})
|
||||
}
|
||||
|
||||
// order by key.
|
||||
sort.SliceStable(ret, func(i, j int) bool {
|
||||
return ret[i].Key < ret[j].Key
|
||||
})
|
||||
@@ -687,7 +688,7 @@ func (sm *StorageMinerAPI) DagstoreInitializeAll(ctx context.Context, params api
|
||||
Key: k,
|
||||
Event: "start",
|
||||
Total: total,
|
||||
Current: i,
|
||||
Current: i + 1, // start with 1
|
||||
}
|
||||
select {
|
||||
case out <- r:
|
||||
|
||||
Reference in New Issue
Block a user