Page MenuHomePhabricator

D4554.id14572.diff
No OneTemporary

D4554.id14572.diff

diff --git a/services/backup/src/Reactors/server/SendLogReactor.cpp b/services/backup/src/Reactors/server/SendLogReactor.cpp
--- a/services/backup/src/Reactors/server/SendLogReactor.cpp
+++ b/services/backup/src/Reactors/server/SendLogReactor.cpp
@@ -97,6 +97,11 @@
if (chunk->size() == 0) {
return std::make_unique<grpc::Status>(grpc::Status::OK);
}
+ if (this->persistenceMethod == PersistenceMethod::DB) {
+ throw std::runtime_error(
+ "please do not send multiple tiny chunks, merge the into bigger "
+ "parts instead");
+ }
if (this->persistenceMethod == PersistenceMethod::BLOB) {
if (this->putReactor == nullptr) {
throw std::runtime_error(
@@ -117,6 +122,8 @@
this->putReactor->scheduleSendingDataChunk(
std::make_unique<std::string>(this->value));
this->value = "";
+ } else {
+ this->persistenceMethod = PersistenceMethod::DB;
}
return nullptr;
};

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 3, 4:50 AM (18 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2610290
Default Alt Text
D4554.id14572.diff (1010 B)

Event Timeline