Added schema version string to backup JSON status docs. Bug fix in backup status JSON, the document was being created outside the transaction retry loop so retries would combine partial element sets across all tries into the result.
This commit is contained in:
parent
dbacfcbc82
commit
c6edcc7f06
|
@ -165,6 +165,7 @@ std::string BackupDescription::toString() const {
|
|||
std::string BackupDescription::toJSON() const {
|
||||
JsonBuilderObject doc;
|
||||
|
||||
doc.setKey("SchemaVersion", "1.0.0");
|
||||
doc.setKey("URL", url.c_str());
|
||||
doc.setKey("Restorable", maxRestorableVersion.present());
|
||||
|
||||
|
|
|
@ -3908,10 +3908,12 @@ public:
|
|||
|
||||
ACTOR static Future<std::string> getStatusJSON(FileBackupAgent* backupAgent, Database cx, std::string tagName) {
|
||||
state Reference<ReadYourWritesTransaction> tr(new ReadYourWritesTransaction(cx));
|
||||
state JsonBuilderObject doc;
|
||||
|
||||
loop {
|
||||
try {
|
||||
state JsonBuilderObject doc;
|
||||
doc.setKey("SchemaVersion", "1.0.0");
|
||||
|
||||
tr->setOption(FDBTransactionOptions::ACCESS_SYSTEM_KEYS);
|
||||
tr->setOption(FDBTransactionOptions::LOCK_AWARE);
|
||||
|
||||
|
@ -4033,14 +4035,13 @@ public:
|
|||
}
|
||||
doc.setKey("Errors", errorList);
|
||||
}
|
||||
break;
|
||||
|
||||
return doc.getJson();
|
||||
}
|
||||
catch (Error &e) {
|
||||
wait(tr->onError(e));
|
||||
}
|
||||
}
|
||||
|
||||
return doc.getJson();
|
||||
}
|
||||
|
||||
ACTOR static Future<std::string> getStatus(FileBackupAgent* backupAgent, Database cx, bool showErrors, std::string tagName) {
|
||||
|
|
Loading…
Reference in New Issue