mirror of https://gitee.com/bigwinds/arangodb
Translate collection name to ID in /_admin/cluster/moveShard.
This commit is contained in:
parent
d124ae2e14
commit
d0f0918baf
|
@ -1260,10 +1260,11 @@ actions.defineHttp({
|
||||||
}
|
}
|
||||||
var ok = true;
|
var ok = true;
|
||||||
var isLeader;
|
var isLeader;
|
||||||
|
var collInfo;
|
||||||
try {
|
try {
|
||||||
var coll = ArangoClusterInfo.getCollectionInfo(body.database,
|
collInfo = ArangoClusterInfo.getCollectionInfo(body.database,
|
||||||
body.collection);
|
body.collection);
|
||||||
var shards = coll.shards;
|
var shards = collInfo.shards;
|
||||||
var shard = shards[body.shard];
|
var shard = shards[body.shard];
|
||||||
var pos = shard.indexOf(body.fromServer);
|
var pos = shard.indexOf(body.fromServer);
|
||||||
if (pos === -1) {
|
if (pos === -1) {
|
||||||
|
@ -1282,7 +1283,7 @@ actions.defineHttp({
|
||||||
var id = ArangoClusterInfo.uniqid();
|
var id = ArangoClusterInfo.uniqid();
|
||||||
var todo = { "type": "moveShard",
|
var todo = { "type": "moveShard",
|
||||||
"database": body.database,
|
"database": body.database,
|
||||||
"collection": body.collection,
|
"collection": collInfo.id,
|
||||||
"shard": body.shard,
|
"shard": body.shard,
|
||||||
"fromServer": body.fromServer,
|
"fromServer": body.fromServer,
|
||||||
"toServer": body.toServer,
|
"toServer": body.toServer,
|
||||||
|
|
Loading…
Reference in New Issue