Github user mtaylor commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1336#discussion_r121715283
--- Diff:
artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java
---
@@ -146,7 +146,17 @@ protected void init(Configuration config,
IOCriticalErrorListener criticalErrorL
journalFF.setDatasync(config.isJournalDatasync());
- Journal localMessage = new JournalImpl(ioExecutors,
config.getJournalFileSize(), config.getJournalMinFiles(),
config.getJournalPoolFiles(), config.getJournalCompactMinFiles(),
config.getJournalCompactPercentage(), journalFF, "activemq-data", "amq",
journalFF.getMaxIO(), 0);
+
+ int fileSize = config.getJournalFileSize();
+ // we need to correct the file size if its not a multiple of the
alignement
+ if (fileSize % journalFF.getAlignment() != 0) {
+ int difference = fileSize % journalFF.getAlignment();
--- End diff --
You're doing the % twice for no reason ;)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---