[
https://issues.apache.org/jira/browse/OAK-12128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18066341#comment-18066341
]
Julian Reschke edited comment on OAK-12128 at 3/17/26 1:12 PM:
---------------------------------------------------------------
Hmmmm.
The lease check already creates an exception, so we could simplify this to:
{noformat}
private void performLeaseCheck(boolean after) {
if (clusterNodeInfo != null) {
try {
clusterNodeInfo.performLeaseCheck();
} catch (DocumentStoreException ex) {
if (after) {
LOG.error("Potential late write operation detected", ex);
}
throw ex;
}
}
}
{noformat}
That said: this means that we'd actually have to modify {{performLeaseCheck
}}in ClusterNodeInfo? or are we getting paranoid?
was (Author: reschke):
Hmmmm.
The lease check already creates an exception, so we could simplify this to:
{noformat}
private void performLeaseCheck(boolean after) {
if (clusterNodeInfo != null) {
try {
clusterNodeInfo.performLeaseCheck();
} catch (DocumentStoreException ex) {
if (after) {
LOG.error("Potential late write operation detected", ex);
}
throw ex;
}
}
}
{noformat}
That said: this means that we'd actually have to modify {{performLeaseCheck}},
right?
> Fail earlier (and add more diags) when detecting late writes
> ------------------------------------------------------------
>
> Key: OAK-12128
> URL: https://issues.apache.org/jira/browse/OAK-12128
> Project: Jackrabbit Oak
> Issue Type: Task
> Components: documentmk
> Reporter: Julian Reschke
> Assignee: Julian Reschke
> Priority: Major
> Attachments: leasecheck.diff
>
>
> While discussing late write with [~stefanegli] we realized that late writes
> (or at least some of them) can actually be detected in
> LeaseCheckDocumentStoreWrapper - if a write call starts *before* lease end
> and completes *after* lease end, it is (likely?) a late write and we can
> either make it fail, or at least log it.
> Q1: does this make sense at all?
> Q2: exception? log? both?
> Q3: write operations or all?
> Q4: add more details to exception? (like method invoked - however stack trace
> will tell us anyway)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)