clebertsuconic commented on code in PR #5498: URL: https://github.com/apache/activemq-artemis/pull/5498#discussion_r1960436975
########## artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java: ########## @@ -205,17 +206,23 @@ public PagingStoreImpl(final SimpleString address, this.syncNonTransactional = syncNonTransactional; - if (scheduledExecutor != null && syncTimeout > 0) { - this.syncTimer = new PageSyncTimer(this, scheduledExecutor, ioExecutor, syncTimeout); - } else { - this.syncTimer = null; - } + this.timedWriter = createPageTimedWriter(scheduledExecutor, syncTimeout); this.cursorProvider = storeFactory.newCursorProvider(this, this.storageManager, addressSettings, executor); this.usingGlobalMaxSize = pagingManager.isUsingGlobalSize(); } + protected PageTimedWriter createPageTimedWriter(ScheduledExecutorService scheduledExecutor, long syncTimeout) { + if (scheduledExecutor != null && syncTimeout > 0) { + PageTimedWriter localWriter = new PageTimedWriter(pageSize, storageManager, this, scheduledExecutor, executor, syncNonTransactional, syncTimeout); Review Comment: @gemmellr I will mark this as resolved (and please unresolve it if you don't agree).. I would prefer to keep these fields as part of the parameter here. These are used in a constructor for the purpose of testability. Accessing a field before constructor is done did not seem a good option to me. I will leave it as is. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact