Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3562936
D4112.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4112.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D4112: [services] Backup - Add Attachment Reactor - read request
Attached
Detach File
Event Timeline
Log In to Comment