[
https://issues.apache.org/jira/browse/ARTEMIS-3763?focusedWorklogId=805443&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-805443
]
ASF GitHub Bot logged work on ARTEMIS-3763:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 01/Sep/22 08:55
Start Date: 01/Sep/22 08:55
Worklog Time Spent: 10m
Work Description: MM53 commented on PR #4200:
URL:
https://github.com/apache/activemq-artemis/pull/4200#issuecomment-1233968960
@clebertsuconic I wouldn't consider this change as a new feature. It just
improves the logging of the existing JDBC-persistence by making two log lines
more predictable than before. The concrete issue was discussed in #4017 and
also shortly described in JIRA.
I only added a new optional configuration parameter which is used to decide
when a warning log should be printed out. Therefore the only effect I could
verify in a test is if this warning was printed. But I couldn't find any
solution to observe the logs without using some crazy reflections which will
definitely break with some newer JDKs or without modifying the `JdbcLeaseLock`
class to set a new `LOGGER` at runtime which doesn't seem to be a good idea
either. To my mind the current tests are sufficient because they verify that
artemis still starts even with the new configuration parameter. Existing
logging also isn't tested at the moment.
If you have a better idea, please let me know. I am open to any suggestions.
Issue Time Tracking
-------------------
Worklog Id: (was: 805443)
Time Spent: 3h 20m (was: 3h 10m)
> Use configurable time margin for checking offset between database server and
> broker
> -----------------------------------------------------------------------------------
>
> Key: ARTEMIS-3763
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3763
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: Configuration
> Affects Versions: 2.21.0
> Reporter: Marlon Müller
> Priority: Minor
> Time Spent: 3h 20m
> Remaining Estimate: 0h
>
> When using JDBC persistence artemis checks for time differences between the
> broker and the database. Currently this check requests the time of the
> database and compares it to the system time before and after sending this
> query by removing the milliseconds and verifying that the database time is
> between the start and the end time.
> This leads to somehow random warnings in the log depending on the current
> milliseconds when this check is performed.
> For example if the time on your artemis server is 00:00:01.000 before the
> check and the time on the database is 00:00:00.999 it will log a warning
> although there is only 1 millisecond difference. On the other hand if your
> artemis server time is 00:00:01.000 after sending the query and the database
> time is 00:00:01.999 there will be no warning although the time is 999
> milliseconds after the end time.
> Therefore it would be better to use a consistent margin for the database time
> during this check. To avoid problems in setups where the system times are not
> well synchronized, this time margin should be configurable to allow the user
> to fine tune it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)