Page MenuHomePhabricator

D3814.id11795.diff
No OneTemporary

D3814.id11795.diff

diff --git a/services/blob/src/Reactors/server/PutReactor.h b/services/blob/src/Reactors/server/PutReactor.h
--- a/services/blob/src/Reactors/server/PutReactor.h
+++ b/services/blob/src/Reactors/server/PutReactor.h
@@ -76,8 +76,15 @@
if (!this->getStatus().status.ok()) {
return;
}
- if (this->uploader == nullptr && !this->dataExists) {
- throw std::runtime_error("uploader not initialized as expected");
+ const database::ReverseIndexItem reverseIndexItem(
+ this->holder, this->blobHash);
+ if (this->uploader == nullptr) {
+ if (!this->dataExists) {
+ throw std::runtime_error("uploader not initialized as expected");
+ }
+ database::DatabaseManager::getInstance().putReverseIndexItem(
+ reverseIndexItem);
+ return;
}
if (this->uploader == nullptr) {
return;
@@ -90,7 +97,6 @@
}
this->uploader->finishUpload();
database::DatabaseManager::getInstance().putBlobItem(*this->blobItem);
- const database::ReverseIndexItem reverseIndexItem(holder, this->blobHash);
database::DatabaseManager::getInstance().putReverseIndexItem(
reverseIndexItem);
}

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 28, 7:24 AM (19 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2593231
Default Alt Text
D3814.id11795.diff (1 KB)

Event Timeline