Page MenuHomePhabricator

D4112.diff
No OneTemporary

D4112.diff

diff --git a/services/backup/src/Reactors/server/AddAttachmentReactor.cpp b/services/backup/src/Reactors/server/AddAttachmentReactor.cpp
--- a/services/backup/src/Reactors/server/AddAttachmentReactor.cpp
+++ b/services/backup/src/Reactors/server/AddAttachmentReactor.cpp
@@ -16,12 +16,32 @@
// we make sure that the blob client's state is flushed to the main memory
// as there may be multiple threads from the pool taking over here
const std::lock_guard<std::mutex> lock(this->reactorStateMutex);
+
+ if (!this->parametersPassed) {
+ if (!request.has_attachmentparameters()) {
+ throw std::runtime_error(
+ "attachment parameters expected but not received");
+ }
+ this->userID = request.attachmentparameters().userid();
+ this->backupID = request.attachmentparameters().backupid();
+ if (!request.attachmentparameters().logid().empty()) {
+ this->logID = request.attachmentparameters().logid();
+ this->parentType = ParentType::LOG;
+ } else {
+ this->parentType = ParentType::BACKUP;
+ }
+ this->parametersPassed = true;
+ return nullptr;
+ }
+ if (!request.has_holder()) {
+ return std::make_unique<grpc::Status>(grpc::Status::OK);
+ }
+ this->holders.push_back(request.holder());
return nullptr;
}
void AddAttachmentReactor::terminateCallback() {
}
-
} // namespace reactor
} // namespace network
} // namespace comm

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 28, 11:05 AM (7 h, 53 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2726075
Default Alt Text
D4112.diff (1 KB)

Event Timeline