Marcel Reutegger created OAK-9517:
-------------------------------------

             Summary: Incorrect time difference warning
                 Key: OAK-9517
                 URL: https://issues.apache.org/jira/browse/OAK-9517
             Project: Jackrabbit Oak
          Issue Type: Improvement
          Components: documentmk
            Reporter: Marcel Reutegger
            Assignee: Marcel Reutegger
             Fix For: 1.42.0


The changes for OAK-9477 introduced a regression when there is just a single 
clusterId in use. The background thread then logs two messages every second:

{noformat}
29.07.2021 10:36:30.550 *WARN* [DocumentNodeStore background read thread (1)] 
org.apache.jackrabbit.oak.plugins.document.util.Utils Detected clock 
differences. Local time is 'Thu Jul 29 10:36:30 UTC 2021', while most recent 
external time is 'Sun Dec 02 16:47:04 UTC 292269055'. Current _lastRev entries: 
[r17af1d646de-0-1]
29.07.2021 10:36:30.550 *WARN* [DocumentNodeStore background read thread (1)] 
org.apache.jackrabbit.oak.plugins.document.util.Utils Background read will be 
delayed by -9223373664409766.0 seconds. Please check system time on cluster 
nodes.
{noformat}

There is no negative impact on the system other than the log messages. The 
background thread is not actually delayed, because the duration is negative.

This behaviour is caused by {{Utils.getMaxExternalTimestamp()}} returning 
{{Long.MIN_VALUE}} when there is just one clusterId in use. With the changes 
from OAK-9477 the implementation then incorrectly thinks there are clock 
differences.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to