[ 
https://issues.apache.org/jira/browse/OAK-12128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18064385#comment-18064385
 ] 

Julian Reschke edited comment on OAK-12128 at 3/17/26 9:52 AM:
---------------------------------------------------------------

So we have one -exception- test failure instead of two:

{code}
[ERROR] Failures:
[ERROR]   DocumentNodeStoreBackgroundUpdateTest.delayedRootDocumentUpdate
Expected: a string containing "concurrent update"
     but: was "This oak instance failed to update the lease in time and can 
therefore no longer access this DocumentNodeStore. (mode: STRICT, leaseEndTime: 
1773134235038 (2026-03-10T09:17:15.038Z), leaseTime: 120000, 
leaseFailureMargin: 20000, lease check end time (leaseEndTime - 
leaseFailureMargin): 1773134215038 (2026-03-10T09:16:55.038Z), now: 
1773134235270 (2026-03-10T09:17:15.270Z), remaining: -20232) Need to stop 
oak-store-document/DocumentNodeStoreService."
[INFO]
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
{code}

This seems to fail even without Mongo (local or Docker), so it reproduces on 
MemoryDocumentStore (I think)



was (Author: reschke):
So we have one -exception - failure instead of two:

{code}
[ERROR] Failures:
[ERROR]   DocumentNodeStoreBackgroundUpdateTest.delayedRootDocumentUpdate
Expected: a string containing "concurrent update"
     but: was "This oak instance failed to update the lease in time and can 
therefore no longer access this DocumentNodeStore. (mode: STRICT, leaseEndTime: 
1773134235038 (2026-03-10T09:17:15.038Z), leaseTime: 120000, 
leaseFailureMargin: 20000, lease check end time (leaseEndTime - 
leaseFailureMargin): 1773134215038 (2026-03-10T09:16:55.038Z), now: 
1773134235270 (2026-03-10T09:17:15.270Z), remaining: -20232) Need to stop 
oak-store-document/DocumentNodeStoreService."
[INFO]
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
{code}

This seems to fail even without Mongo (local or Docker), so it reproduces on 
MemoryDocumentStore (I think)


> 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)

Reply via email to