Author: stefanegli
Date: Wed Aug 12 14:48:25 2015
New Revision: 1695543
URL: http://svn.apache.org/r1695543
Log:
OAK-2682 : critical buglet fix : when the time difference is too large send an
*AssertionError*, not an IllegalStateException which will be caught by the
outer try and nothing other than a simple WARN happens. This way the
DocumentNodeStore service will not properly be activated/available, hence the
repository cannot start, hence the user will probably get a 503 - and that's
what should happen
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java?rev=1695543&r1=1695542&r2=1695543&view=diff
==============================================================================
---
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
(original)
+++
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
Wed Aug 12 14:48:25 2015
@@ -455,7 +455,7 @@ public class DocumentNodeStoreService {
final long timeDiff = ds.determineServerTimeDifferenceMillis();
log.info("registerNodeStore: server time difference: {}ms (max
allowed: {}ms)", timeDiff, maxDiff);
if (Math.abs(timeDiff) > Math.abs(maxDiff)) {
- throw new IllegalStateException("Server clock seems off (" +
timeDiff + "ms) by more than configured amount ("
+ throw new AssertionError("Server clock seems off (" + timeDiff
+ "ms) by more than configured amount ("
+ maxDiff + "ms)");
}
} catch (RuntimeException e) { // no checked exception