[
https://issues.apache.org/jira/browse/ARTEMIS-4401?focusedWorklogId=879493&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-879493
]
ASF GitHub Bot logged work on ARTEMIS-4401:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 08/Sep/23 13:43
Start Date: 08/Sep/23 13:43
Worklog Time Spent: 10m
Work Description: 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.
Issue Time Tracking
-------------------
Worklog Id: (was: 879493)
Time Spent: 40m (was: 0.5h)
> slow performance of JDBC while paging
> -------------------------------------
>
> Key: ARTEMIS-4401
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4401
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Clebert Suconic
> Assignee: Clebert Suconic
> Priority: Major
> Fix For: 2.31.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Syncs are not properly implemented into page files. Basically ever message
> sent and every blob update is issuing a sync update on the context and a
> commit on the Database.
> Certain databases will have an OK performance with lots of commits (e.g.
> Postgres) but I'm not sure how correct is the blob update.
> As part of this task I'm creating a few Database tests to validate these
> changes.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)