Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3377776
D3814.id11795.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
D3814.id11795.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D3814: [services] Blob - Add holder to the blob DB if data exists
Attached
Detach File
Event Timeline
Log In to Comment