Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3354149
D3729.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
857 B
Referenced Files
None
Subscribers
None
D3729.diff
View Options
diff --git a/services/backup/docker-server/contents/server/src/DatabaseEntities/LogItem.cpp b/services/backup/docker-server/contents/server/src/DatabaseEntities/LogItem.cpp
--- a/services/backup/docker-server/contents/server/src/DatabaseEntities/LogItem.cpp
+++ b/services/backup/docker-server/contents/server/src/DatabaseEntities/LogItem.cpp
@@ -45,7 +45,12 @@
if (!this->value.size()) {
throw std::runtime_error("value empty");
}
- // todo maybe check if values is not too big if persistedInBlob is false
+ if (!this->persistedInBlob &&
+ this->value.size() > LOG_DATA_SIZE_DATABASE_LIMIT) {
+ throw std::runtime_error(
+ "the value of this log is too big to be stored in the database, it "
+ "should be stored in the blob instead");
+ }
}
void LogItem::assignItemFromDatabase(const AttributeValues &itemFromDB) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 12:02 PM (21 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2575499
Default Alt Text
D3729.diff (857 B)
Attached To
Mode
D3729: [services] Backup - Check if log item isn't too big to be stored in the database
Attached
Detach File
Event Timeline
Log In to Comment