diff options
author | Simon Rettberg | 2024-05-08 18:36:17 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-05-08 18:36:17 +0200 |
commit | 44f4856fd30e7544648ec9d955682fd9bd64fb62 (patch) | |
tree | b5be00fb9b2c88bd6ce0a1be512519bcdfdcd9ac | |
parent | [server] Add startup script that tweaks -Xmx (diff) | |
download | tutor-module-44f4856fd30e7544648ec9d955682fd9bd64fb62.tar.gz tutor-module-44f4856fd30e7544648ec9d955682fd9bd64fb62.tar.xz tutor-module-44f4856fd30e7544648ec9d955682fd9bd64fb62.zip |
[server] DbImage: Add log messages
-rw-r--r-- | dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java index 49dfaa9f..a6752f2d 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java @@ -627,11 +627,15 @@ public class DbImage { private static void writeChunks(MysqlConnection connection, String imageVersionId, ChunkList chunks) throws SQLException { - if (chunks == null || chunks.isEmpty()) + if (chunks == null || chunks.isEmpty()) { + LOGGER.info("Not writing chunk list - empty or missing"); return; + } for (FileChunk chunk : chunks.getAll()) { - if (chunk.getSha1Sum() == null) + if (chunk.getSha1Sum() == null) { + LOGGER.info("Not writing chunk list - at least one hash missing"); return; + } } MysqlStatement stmt = connection.prepareStatement("INSERT IGNORE INTO imageblock" + " (imageversionid, startbyte, blocksize, blocksha1, ismissing) VALUES" |