Page MenuHomePhabricator

D4086.diff
No OneTemporary

D4086.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
@@ -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

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)

Event Timeline