Conversation
...ain/java/org/apache/jackrabbit/oak/plugins/document/util/LeaseCheckDocumentStoreWrapper.java
Show resolved
Hide resolved
...ain/java/org/apache/jackrabbit/oak/plugins/document/util/LeaseCheckDocumentStoreWrapper.java
Show resolved
Hide resolved
...ain/java/org/apache/jackrabbit/oak/plugins/document/util/LeaseCheckDocumentStoreWrapper.java
Outdated
Show resolved
Hide resolved
...ain/java/org/apache/jackrabbit/oak/plugins/document/util/LeaseCheckDocumentStoreWrapper.java
Outdated
Show resolved
Hide resolved
|
I wonder if we should add a distinct log message when the lease check fails after the operation has already run (in the finally block). That would make it easier to find and analyze cases where the lease was lost during the call. |
| try { | ||
| operation.run(); | ||
| } finally { | ||
| performLeaseCheck(); |
There was a problem hiding this comment.
Haven't tested this, but isn't it possible that the operation throws an exception and the lease check in finally also fails, so the DocumentStoreException from the lease check would mask the exception thrown by the operation?
There was a problem hiding this comment.
Yes, I think. Note that this case apparently has no test coverage (or it is the reason for the tests complaining about the incorrect exception message). Let me try that.
EDIT: yes, that's the reason. Good catch.
@Joscorbe - https://issues.apache.org/jira/browse/OAK-12128?focusedCommentId=18064356&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-18064356 Well, help in analyzing is the whole point of this PR. The question is whether it actually adds anything, because next a DSException will be thrown anyway. Adding this requires minor changes in |
…ptions thrown ny the delegated method
|
Note: I could minimize the diff by re-adding the |
|
The test fails for me as well. Occasionally. |
|
Changes:
|
| clusterNodeInfo.performLeaseCheck(); | ||
| } catch (DocumentStoreException ex) { | ||
| if (after) { | ||
| LOG.error("Potential late write operation detected", new Exception("call stack")); |
There was a problem hiding this comment.
wondering, in case of a late write we might be under memory pressure. in which case even new Exception might not work. what about doing 2 logs, first one without the exception, followed by a second one with the exception?
|



test failures: see https://issues.apache.org/jira/browse/OAK-12128?focusedCommentId=18063476&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-18063476