mirror of https://gitee.com/bigwinds/arangodb
fixed MoveShard after cppcheck-frenzy
This commit is contained in:
parent
f052b33ec3
commit
4919a65ee8
|
@ -61,7 +61,7 @@ MoveShard::~MoveShard() {}
|
||||||
bool MoveShard::create() {
|
bool MoveShard::create() {
|
||||||
|
|
||||||
// Lookup from server
|
// Lookup from server
|
||||||
if (_from.compare("DBServer") == 0) {
|
if (_from.find("DBServer") == 0) {
|
||||||
try {
|
try {
|
||||||
_from = uuidLookup(_snapshot, _from);
|
_from = uuidLookup(_snapshot, _from);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
@ -70,7 +70,7 @@ bool MoveShard::create() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Lookup to Server
|
// Lookup to Server
|
||||||
if (_to.compare("DBServer") == 0) {
|
if (_to.find("DBServer") == 0) {
|
||||||
try {
|
try {
|
||||||
_to = uuidLookup(_snapshot, _to);
|
_to = uuidLookup(_snapshot, _to);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
@ -143,7 +143,7 @@ bool MoveShard::create() {
|
||||||
bool MoveShard::start() {
|
bool MoveShard::start() {
|
||||||
|
|
||||||
// Lookup from server
|
// Lookup from server
|
||||||
if (_from.compare("DBServer") == 0) {
|
if (_from.find("DBServer") == 0) {
|
||||||
try {
|
try {
|
||||||
_from = uuidLookup(_snapshot, _from);
|
_from = uuidLookup(_snapshot, _from);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
@ -153,7 +153,7 @@ bool MoveShard::start() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lookup to Server
|
// Lookup to Server
|
||||||
if (_to.compare("DBServer") == 0) {
|
if (_to.find("DBServer") == 0) {
|
||||||
try {
|
try {
|
||||||
_to = uuidLookup(_snapshot, _to);
|
_to = uuidLookup(_snapshot, _to);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
@ -380,7 +380,7 @@ JOB_STATUS MoveShard::status() {
|
||||||
_snapshot(pos[status] + _jobId + "/shards").slice()[0].copyString();
|
_snapshot(pos[status] + _jobId + "/shards").slice()[0].copyString();
|
||||||
|
|
||||||
// Lookup from server
|
// Lookup from server
|
||||||
if (_from.compare("DBServer") == 0) {
|
if (_from.find("DBServer") == 0) {
|
||||||
try {
|
try {
|
||||||
_from = uuidLookup(_snapshot, _from);
|
_from = uuidLookup(_snapshot, _from);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
@ -390,7 +390,7 @@ JOB_STATUS MoveShard::status() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lookup to Server
|
// Lookup to Server
|
||||||
if (_to.compare("DBServer") == 0) {
|
if (_to.find("DBServer") == 0) {
|
||||||
try {
|
try {
|
||||||
_to = uuidLookup(_snapshot, _to);
|
_to = uuidLookup(_snapshot, _to);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
|
Loading…
Reference in New Issue