1
0
Fork 0

Translate collection name to ID in /_admin/cluster/moveShard.

This commit is contained in:
Max Neunhoeffer 2016-06-09 14:42:42 +02:00
parent d124ae2e14
commit d0f0918baf
1 changed files with 4 additions and 3 deletions

View File

@ -1260,10 +1260,11 @@ actions.defineHttp({
}
var ok = true;
var isLeader;
var collInfo;
try {
var coll = ArangoClusterInfo.getCollectionInfo(body.database,
collInfo = ArangoClusterInfo.getCollectionInfo(body.database,
body.collection);
var shards = coll.shards;
var shards = collInfo.shards;
var shard = shards[body.shard];
var pos = shard.indexOf(body.fromServer);
if (pos === -1) {
@ -1282,7 +1283,7 @@ actions.defineHttp({
var id = ArangoClusterInfo.uniqid();
var todo = { "type": "moveShard",
"database": body.database,
"collection": body.collection,
"collection": collInfo.id,
"shard": body.shard,
"fromServer": body.fromServer,
"toServer": body.toServer,