Fix asan error caused by StringRef parameter of updateRestoreState
This commit is contained in:
parent
0c718f7a04
commit
6fca5b4e13
|
@ -3545,7 +3545,7 @@ ACTOR Future<Void> recoverBlobManager(Reference<BlobManagerData> bmData) {
|
|||
// terminate blob restore for non-retryable errors
|
||||
TraceEvent("ManifestLoadError", bmData->id).error(e).detail("Phase", phase);
|
||||
std::string errorMessage = fmt::format("Manifest loading error '{}'", e.what());
|
||||
wait(BlobRestoreController::updateError(restoreController, errorMessage));
|
||||
wait(BlobRestoreController::updateError(restoreController, StringRef(errorMessage)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -657,7 +657,7 @@ ACTOR Future<Void> blobMigrator(BlobMigratorInterface interf, Reference<AsyncVar
|
|||
TraceEvent("BlobMigratorError", interf.id()).error(e);
|
||||
std::string errorMessage = fmt::format("Migrator failure '{}' on {}", e.what(), interf.address().toString());
|
||||
Reference<BlobRestoreController> restoreController = makeReference<BlobRestoreController>(db, normalKeys);
|
||||
wait(BlobRestoreController::updateError(restoreController, errorMessage));
|
||||
wait(BlobRestoreController::updateError(restoreController, StringRef(errorMessage)));
|
||||
}
|
||||
return Void();
|
||||
}
|
||||
|
|
|
@ -120,7 +120,8 @@ ACTOR Future<Void> BlobRestoreController::updateState(Reference<BlobRestoreContr
|
|||
return Void();
|
||||
}
|
||||
|
||||
ACTOR Future<Void> BlobRestoreController::updateError(Reference<BlobRestoreController> self, StringRef errorMessage) {
|
||||
ACTOR Future<Void> BlobRestoreController::updateError(Reference<BlobRestoreController> self,
|
||||
Standalone<StringRef> errorMessage) {
|
||||
Standalone<BlobRestoreState> newState;
|
||||
newState.error = StringRef(newState.arena(), errorMessage);
|
||||
newState.phase = BlobRestorePhase::ERROR;
|
||||
|
|
|
@ -183,7 +183,7 @@ public:
|
|||
ACTOR static Future<Void> updateState(Reference<BlobRestoreController> self,
|
||||
BlobRestorePhase newPhase,
|
||||
Optional<BlobRestorePhase> expectedPhase);
|
||||
ACTOR static Future<Void> updateError(Reference<BlobRestoreController> self, StringRef errorMessage);
|
||||
ACTOR static Future<Void> updateError(Reference<BlobRestoreController> self, Standalone<StringRef> errorMessage);
|
||||
|
||||
private:
|
||||
Database db_;
|
||||
|
|
Loading…
Reference in New Issue