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:
Raúl Kripalani
2021-08-05 19:40:02 +01:00
parent dd0eec3994
commit 221d1a0e3c
3 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -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: