Page MenuHomePhabricator

D4554.diff
No OneTemporary

D4554.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,12 @@
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 (less than " +
+ std::to_string(LOG_DATA_SIZE_DATABASE_LIMIT) +
+ "), merge them into bigger parts instead");
+ }
if (this->persistenceMethod == PersistenceMethod::BLOB) {
if (this->putReactor == nullptr) {
throw std::runtime_error(
@@ -117,6 +123,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, 2:34 AM (22 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2609825
Default Alt Text
D4554.diff (1 KB)

Event Timeline