fix ec.encode not finding the local ec shards

This commit is contained in:
Chris Lu
2019-06-03 10:38:21 -07:00
parent 7e80b2b882
commit d85b41b904
4 changed files with 15 additions and 8 deletions

View File

@@ -62,7 +62,7 @@ func oneServerCopyAndMountEcShardsFromSource(ctx context.Context, grpcDialOption
SourceDataNode: existingLocation,
})
if copyErr != nil {
return copyErr
return fmt.Errorf("copy %d.%v %s => %s : %v\n", volumeId, shardIdsToCopy, existingLocation, targetServer.info.Id, copyErr)
}
}
@@ -73,7 +73,7 @@ func oneServerCopyAndMountEcShardsFromSource(ctx context.Context, grpcDialOption
ShardIds: shardIdsToCopy,
})
if mountErr != nil {
return mountErr
return fmt.Errorf("mount %d.%v on %s : %v\n", volumeId, shardIdsToCopy, targetServer.info.Id, mountErr)
}
if targetServer.info.Id != existingLocation {

View File

@@ -97,7 +97,7 @@ func doEcEncode(ctx context.Context, commandEnv *commandEnv, collection string,
// balance the ec shards to current cluster
err = spreadEcShards(ctx, commandEnv, vid, collection, locations)
if err != nil {
return fmt.Errorf("spread ec shards for volume %d to %s: %v", vid, locations[0].Url, err)
return fmt.Errorf("spread ec shards for volume %d from %s: %v", vid, locations[0].Url, err)
}
return nil