Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3552476
D4086.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
898 B
Referenced Files
None
Subscribers
None
D4086.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
@@ -12,6 +12,19 @@
namespace reactor {
void AddAttachmentReactor::initializePutReactor() {
+ if (this->holder.empty()) {
+ throw std::runtime_error(
+ "put reactor cannot be initialized with empty value");
+ }
+ if (this->hash.empty()) {
+ throw std::runtime_error(
+ "put reactor cannot be initialized with empty hash");
+ }
+ if (this->putReactor == nullptr) {
+ this->putReactor = std::make_shared<reactor::BlobPutClientReactor>(
+ this->holder, this->hash, &this->blobPutDoneCV);
+ this->blobClient.put(this->putReactor);
+ }
}
void AddAttachmentReactor::storeInDatabase() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 27, 8:11 PM (6 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2719246
Default Alt Text
D4086.diff (898 B)
Attached To
Mode
D4086: [services] Backup - Add Attachment Reactor - initialize put reactor
Attached
Detach File
Event Timeline
Log In to Comment