add status
This commit is contained in:
parent
eb557d59e1
commit
f48ba989c3
|
@ -699,6 +699,7 @@ const KeyRef JSONSchemas::statusSchema = LiteralStringRef(R"statusSchema(
|
|||
"maintenance_seconds_remaining":1.0,
|
||||
"data_distribution_disabled_for_ss_failures":true,
|
||||
"data_distribution_disabled_for_rebalance":true,
|
||||
"data_distribution_disabled_hex": "1",
|
||||
"data_distribution_disabled":true,
|
||||
"active_primary_dc":"pv",
|
||||
"bounce_impact":{
|
||||
|
|
|
@ -1577,7 +1577,8 @@ ACTOR Future<Void> BgDDValleyFiller(DDQueueData* self, int teamCollectionIndex)
|
|||
// reset loop interval
|
||||
rebalancePollingInterval = SERVER_KNOBS->BG_REBALANCE_POLLING_INTERVAL;
|
||||
} else if (val.present()) {
|
||||
if (val.get().size() > 0) {
|
||||
// FIXME: better way for upgrade? for example, using a new key to record mode
|
||||
if (val.get().size() > sizeof(int)) {
|
||||
int ddIgnore = BinaryReader::fromStringRef<int>(val.get(), Unversioned());
|
||||
if (ddIgnore & DDIgnore::REBALANCE_DISK) {
|
||||
disableReadBalance = true;
|
||||
|
|
|
@ -1535,6 +1535,8 @@ struct LoadConfigurationResult {
|
|||
Optional<Key> healthyZone;
|
||||
double healthyZoneSeconds;
|
||||
bool rebalanceDDIgnored;
|
||||
// FIXME: possible convert it to int if upgrade value can be resolved?
|
||||
std::string rebalanceDDIgnoreHex; // any or combination of 0, 1, 2, see enum DDIgnore;
|
||||
bool dataDistributionDisabled;
|
||||
|
||||
LoadConfigurationResult()
|
||||
|
@ -1609,6 +1611,9 @@ loadConfiguration(Database cx, JsonBuilderArray* messages, std::set<std::string>
|
|||
}
|
||||
}
|
||||
res.rebalanceDDIgnored = rebalanceDDIgnored.get().present();
|
||||
if (res.rebalanceDDIgnored) {
|
||||
res.rebalanceDDIgnoreHex = rebalanceDDIgnored.get().get().toHexString();
|
||||
}
|
||||
if (ddModeKey.get().present()) {
|
||||
BinaryReader rd(ddModeKey.get().get(), Unversioned());
|
||||
int currentMode;
|
||||
|
@ -2955,6 +2960,7 @@ ACTOR Future<StatusReply> clusterGetStatus(
|
|||
}
|
||||
if (loadResult.get().rebalanceDDIgnored) {
|
||||
statusObj["data_distribution_disabled_for_rebalance"] = true;
|
||||
statusObj["data_distribution_disabled_hex"] = loadResult.get().rebalanceDDIgnoreHex;
|
||||
}
|
||||
if (loadResult.get().dataDistributionDisabled) {
|
||||
statusObj["data_distribution_disabled"] = true;
|
||||
|
|
Loading…
Reference in New Issue