mirror of https://gitee.com/bigwinds/arangodb
[3.4] Early sort out system collections for maintenance (#7589)
This commit is contained in:
parent
f5f059e715
commit
1b75220a1b
|
@ -86,6 +86,7 @@ Result DBServerAgencySync::getLocalCollections(VPackBuilder& collections) {
|
||||||
auto cols = vocbase->collections(false);
|
auto cols = vocbase->collections(false);
|
||||||
|
|
||||||
for (auto const& collection : cols) {
|
for (auto const& collection : cols) {
|
||||||
|
if (!collection->system()) {
|
||||||
collections.add(VPackValue(collection->name()));
|
collections.add(VPackValue(collection->name()));
|
||||||
|
|
||||||
VPackObjectBuilder col(&collections);
|
VPackObjectBuilder col(&collections);
|
||||||
|
@ -121,6 +122,7 @@ Result DBServerAgencySync::getLocalCollections(VPackBuilder& collections) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (std::exception const& e) {
|
} catch (std::exception const& e) {
|
||||||
return Result(
|
return Result(
|
||||||
TRI_ERROR_INTERNAL,
|
TRI_ERROR_INTERNAL,
|
||||||
|
|
|
@ -468,13 +468,11 @@ arangodb::Result arangodb::maintenance::diffPlanLocal (
|
||||||
if (pdbs.hasKey(dbname)) { // if in plan
|
if (pdbs.hasKey(dbname)) { // if in plan
|
||||||
for (auto const& sh : VPackObjectIterator(db.value)) { // for each local shard
|
for (auto const& sh : VPackObjectIterator(db.value)) { // for each local shard
|
||||||
std::string shName = sh.key.copyString();
|
std::string shName = sh.key.copyString();
|
||||||
if (shName.front() != '_') { // exclude local system shards/collections
|
|
||||||
handleLocalShard(dbname, shName, sh.value, shardMap.slice(), commonShrds,
|
handleLocalShard(dbname, shName, sh.value, shardMap.slice(), commonShrds,
|
||||||
indis, serverId, actions);
|
indis, serverId, actions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -832,9 +830,6 @@ arangodb::Result arangodb::maintenance::reportInCurrent(
|
||||||
for (auto const& shard : VPackObjectIterator(database.value)) {
|
for (auto const& shard : VPackObjectIterator(database.value)) {
|
||||||
|
|
||||||
auto const shName = shard.key.copyString();
|
auto const shName = shard.key.copyString();
|
||||||
if (shName.at(0) == '_') { // local system collection
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
auto const shSlice = shard.value;
|
auto const shSlice = shard.value;
|
||||||
auto const colName = shSlice.get(StaticStrings::DataSourcePlanId).copyString();
|
auto const colName = shSlice.get(StaticStrings::DataSourcePlanId).copyString();
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,56 +1,71 @@
|
||||||
R"=(
|
R"=(
|
||||||
{
|
{
|
||||||
"Health": {
|
"Health": {
|
||||||
"PRMR-d6e6b701-e455-4f8f-86cf-a87faaf235da": {
|
"CRDN-122291f4-3bfe-4037-b51d-b6b1066604b0": {
|
||||||
"AdvertisedEndpoint": "",
|
"Endpoint": "tcp://[::1]:11098",
|
||||||
"Timestamp": "2018-10-01T10:17:22Z",
|
|
||||||
"SyncStatus": "SERVING",
|
|
||||||
"Host": "ac8ddefc7d1f4364ba655b4debcd076f",
|
|
||||||
"Status": "GOOD",
|
|
||||||
"ShortName": "DBServer0002",
|
|
||||||
"Endpoint": "tcp://[::1]:11198"
|
|
||||||
},
|
|
||||||
"PRMR-62eeb203-c38c-4879-b343-ca34633705cf": {
|
|
||||||
"AdvertisedEndpoint": "",
|
|
||||||
"Timestamp": "2018-10-01T10:17:23Z",
|
|
||||||
"SyncStatus": "SERVING",
|
|
||||||
"Host": "ac8ddefc7d1f4364ba655b4debcd076f",
|
|
||||||
"Status": "GOOD",
|
|
||||||
"ShortName": "DBServer0003",
|
|
||||||
"Endpoint": "tcp://[::1]:11196"
|
|
||||||
},
|
|
||||||
"PRMR-498a2f3d-9700-4917-afa9-ec317f6e2e3d": {
|
|
||||||
"AdvertisedEndpoint": "",
|
|
||||||
"Timestamp": "2018-10-01T10:17:22Z",
|
|
||||||
"SyncStatus": "SERVING",
|
|
||||||
"Host": "ac8ddefc7d1f4364ba655b4debcd076f",
|
|
||||||
"Status": "GOOD",
|
|
||||||
"ShortName": "DBServer0001",
|
|
||||||
"Endpoint": "tcp://[::1]:11197"
|
|
||||||
},
|
|
||||||
"CRDN-8d79ded3-9062-4521-8fa6-7ef3aaf144ad": {
|
|
||||||
"AdvertisedEndpoint": "",
|
|
||||||
"SyncStatus": "SERVING",
|
|
||||||
"Timestamp": "2018-10-01T10:17:24Z",
|
|
||||||
"Host": "ac8ddefc7d1f4364ba655b4debcd076f",
|
|
||||||
"ShortName": "Coordinator0002",
|
|
||||||
"Status": "GOOD",
|
|
||||||
"Endpoint": "tcp://[::1]:11098"
|
|
||||||
},
|
|
||||||
"CRDN-383e3a90-2b26-49fe-9974-f9fce7b5eabf": {
|
|
||||||
"AdvertisedEndpoint": "",
|
|
||||||
"SyncStatus": "SERVING",
|
|
||||||
"Timestamp": "2018-10-01T10:17:24Z",
|
|
||||||
"Host": "ac8ddefc7d1f4364ba655b4debcd076f",
|
|
||||||
"ShortName": "Coordinator0001",
|
"ShortName": "Coordinator0001",
|
||||||
"Status": "GOOD",
|
"Status": "GOOD",
|
||||||
"Endpoint": "tcp://[::1]:11097"
|
"Version": "3.4.0-rc.5",
|
||||||
|
"SyncTime": "2018-12-03T09:58:57Z",
|
||||||
|
"Timestamp": "2018-12-03T09:58:58Z",
|
||||||
|
"Host": "7e56da52e94b4c5190f0e8d559243c42",
|
||||||
|
"SyncStatus": "SERVING",
|
||||||
|
"LastAckedTime": "2018-12-03T09:58:58Z",
|
||||||
|
"Engine": "rocksdb"
|
||||||
|
},
|
||||||
|
"PRMR-5dcd6f32-1207-47b2-bdc4-4ab7d23bbc23": {
|
||||||
|
"Endpoint": "tcp://[::1]:11198",
|
||||||
|
"ShortName": "DBServer0001",
|
||||||
|
"Status": "GOOD",
|
||||||
|
"Version": "3.4.0-rc.5",
|
||||||
|
"SyncTime": "2018-12-03T09:58:56Z",
|
||||||
|
"Timestamp": "2018-12-03T09:58:57Z",
|
||||||
|
"Host": "7e56da52e94b4c5190f0e8d559243c42",
|
||||||
|
"SyncStatus": "SERVING",
|
||||||
|
"LastAckedTime": "2018-12-03T09:58:57Z",
|
||||||
|
"Engine": "rocksdb"
|
||||||
|
},
|
||||||
|
"CRDN-33a81ec1-e22a-43fe-997c-6cc766208cb0": {
|
||||||
|
"Endpoint": "tcp://[::1]:11097",
|
||||||
|
"ShortName": "Coordinator0002",
|
||||||
|
"Status": "GOOD",
|
||||||
|
"Version": "3.4.0-rc.5",
|
||||||
|
"SyncTime": "2018-12-03T09:58:57Z",
|
||||||
|
"Timestamp": "2018-12-03T09:58:58Z",
|
||||||
|
"Host": "7e56da52e94b4c5190f0e8d559243c42",
|
||||||
|
"SyncStatus": "SERVING",
|
||||||
|
"LastAckedTime": "2018-12-03T09:58:58Z",
|
||||||
|
"Engine": "rocksdb"
|
||||||
|
},
|
||||||
|
"PRMR-16df9cb4-e499-4193-92fb-db98e891949f": {
|
||||||
|
"Endpoint": "tcp://[::1]:11197",
|
||||||
|
"ShortName": "DBServer0002",
|
||||||
|
"Status": "GOOD",
|
||||||
|
"Version": "3.4.0-rc.5",
|
||||||
|
"SyncTime": "2018-12-03T09:58:57Z",
|
||||||
|
"Timestamp": "2018-12-03T09:58:58Z",
|
||||||
|
"Host": "7e56da52e94b4c5190f0e8d559243c42",
|
||||||
|
"SyncStatus": "SERVING",
|
||||||
|
"LastAckedTime": "2018-12-03T09:58:58Z",
|
||||||
|
"Engine": "rocksdb"
|
||||||
|
},
|
||||||
|
"PRMR-1296936a-96c5-4304-9ecd-fb623dd98f86": {
|
||||||
|
"Endpoint": "tcp://[::1]:11196",
|
||||||
|
"ShortName": "DBServer0003",
|
||||||
|
"Status": "GOOD",
|
||||||
|
"Version": "3.4.0-rc.5",
|
||||||
|
"SyncTime": "2018-12-03T09:58:58Z",
|
||||||
|
"Timestamp": "2018-12-03T09:58:59Z",
|
||||||
|
"Host": "7e56da52e94b4c5190f0e8d559243c42",
|
||||||
|
"SyncStatus": "SERVING",
|
||||||
|
"LastAckedTime": "2018-12-03T09:58:59Z",
|
||||||
|
"Engine": "rocksdb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"DBServers": {},
|
"DBServers": {},
|
||||||
"State": {
|
"State": {
|
||||||
"Mode": "Normal",
|
"Mode": "Normal",
|
||||||
"Timestamp": "2018-10-01T10:17:22Z"
|
"Timestamp": "2018-12-03T09:58:56Z"
|
||||||
},
|
},
|
||||||
"Shards": {}
|
"Shards": {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue