clebertsuconic commented on code in PR #4591:
URL: https://github.com/apache/activemq-artemis/pull/4591#discussion_r1319891296
##########
artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFile.java:
##########
@@ -332,13 +409,15 @@ public void close(boolean waitOnSync, boolean block)
throws Exception {
@Override
public void sync() throws IOException {
- final SimpleWaitIOCallback callback = new SimpleWaitIOCallback();
- executor.execute(callback::done);
-
try {
- callback.waitCompletion();
+ // 30 seconds is an eternity here. If there's no response within
SYNC_TIMEOUT milliseconds
+ // nothing better could be done other than onIOError which will
likely shutdown the broker.
+ // If this ever happens the broker will be probably failing in other
places as well
+ // due to the lack of connectivity with the database
+ if (!pendingWrites.await(SYNC_TIMEOUT, TimeUnit.MILLISECONDS)) {
Review Comment:
@gtully I've tried to not be dependent on any timeout. however the current
way this is implemented... a need a page completed before I can move to the
next page.
I will configure the timeout somewhere.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]