[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-28 Thread JIRA


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

Michael Dürig commented on OAK-8071:


Fix for 1.10: http://svn.apache.org/viewvc?rev=1854559&view=rev  
Fix for 1.8: http://svn.apache.org/viewvc?rev=1854560&view=rev


> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.8.12, 1.10.2
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-28 Thread JIRA


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

Michael Dürig commented on OAK-8071:


[~reschke], this should still be blocking the release for the 1.10 and 1.8 
branches. This I'd rather leave it open until backported. ETA: tomorrow morning 
(UTC+1). 

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.8.12, 1.10.2
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-28 Thread Julian Reschke (JIRA)


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

Julian Reschke commented on OAK-8071:
-

If this is fixed in trunk, the ticket should be set to "resolved".

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.8.12, 1.10.2
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-28 Thread JIRA


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

Michael Dürig commented on OAK-8071:


I filed OAK-8094  to follow up on the JMX part. 

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.8.12, 1.10.2
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-28 Thread JIRA


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

Michael Dürig commented on OAK-8071:


Fixed in trunk at http://svn.apache.org/viewvc?rev=1854515&view=rev

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.8.12, 1.10.2
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-28 Thread JIRA


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

Michael Dürig commented on OAK-8071:


Thanks [~ahanikel] for the review. I will thus go forward with the changes from 
https://github.com/mduerig/jackrabbit-oak/commits/OAK-8071-logging here. I will 
move the patched proposed on the other branch for improving the JMX monitoring 
into a new issue of type improvement. 

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.8.12, 1.10.2
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-27 Thread Axel Hanikel (JIRA)


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

Axel Hanikel commented on OAK-8071:
---

[~mduerig] Sorry for the delay, I had to deal with some upgrade-related issues. 
The patch looks good to me.

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.8.12, 1.10.2
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-26 Thread JIRA


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

Michael Dürig commented on OAK-8071:


[~ahanikel], could you have a look at this one: 
[https://github.com/mduerig/jackrabbit-oak/commits/OAK-8071-logging]

this should be simple enough and low risk to backport.

 

There is an issue though with the way we detect the current commit crossing the 
gc boundary (with this branch as well as with the JMX variant): at the point in 
time where {{Commit#gcGeneration}} is set to a non {{null}} value, the 
potentially time consuming rewriting has already taken place. However, it is 
this rewriting that we want to detect in the first place. Currently the only 
simple enough approach I'm seeing is to generally rely on the time it takes for 
a commit to complete. 

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.8.12, 1.10.2
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-26 Thread Axel Hanikel (JIRA)


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

Axel Hanikel commented on OAK-8071:
---

[~mduerig] I agree with what you say about the gc generation. For the 
CommitTracker, perhaps we can add a comment like 
[https://github.com/ahanikel/jackrabbit-oak/commits/OAK-8071-2] to make clear 
that the CommitTracker's dequeue and execute methods must now be used in 
sequence within the same critical section?

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.8.12, 1.10.2
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-26 Thread JIRA


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

Michael Dürig commented on OAK-8071:


{quote}perhaps we can add a comment like
{quote}
Good point, I'll merge this into my branch.

 

OTOH, I while the new monitoring is quite sophisticated this way, I figured out 
that I cannot backport it to 1.8. There are zillions of conflicts. I'm 
currently trying an alternative and simpler approach logging warnings instead. 
The JMX approach is still useful though for trunk I think. Will share another 
branch soon.

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.8.12, 1.10.2
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-26 Thread JIRA


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

Michael Dürig commented on OAK-8071:


Thanks [~ahanikel] for the feedback. I applied it with some modifications. Most 
prominently I avoided to resolve the gc generation from JMX calls as this could 
cause loading of segments. Instead I memoise the gc generation in 
{{Commit#gcGeneration}} setting its value when the underlying segment needs to 
be loaded anyway. I think this approach is especially important wrt. 
{{SegmentNodeStoreStatsMBean#getQueuedWriters}}, which request the GC 
generation of as many commits as are currently waiting. This means that for 
queued commits the gc generation will usually show as N/A. I don't consider 
this a problem as only the gc generation of the current commit in progress is 
interesting for determining whether the current commit crossed a gc boundary 
and might thus be susceptible for OAK-8014.

I cleaned up the commit history and grouped related changes in separate 
commits. Please have a look at 
https://github.com/mduerig/jackrabbit-oak/commits/OAK-8071-2

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.8.12, 1.10.2
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-25 Thread Axel Hanikel (JIRA)


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

Axel Hanikel commented on OAK-8071:
---

[~mduerig] I've made a few changes in 
[https://github.com/ahanikel/jackrabbit-oak/commits/OAK-8071] :
 * Cosmetic change: Renamed variable "w" to "k" because I couldn't figure out 
what "w" stands for ;)
 * I think {{currentCommit}} should be volatile because it is probably called 
from a different thread via {{#getCurrentWriter}} (although it's probably not a 
big issue).
 * I've tried to add the full GC generation to the {{CommitsTracker}} (but it's 
not reflected in the {{SegmentNodeStoreStats}} yet). Perhaps you can quickly 
check if what I did makes any sense...

Next steps:
 * Add the generation to the {{SegmentNodeStoreStats}}.
 * The {{CommitsTrackerTest}} (both tests) are failing for me. I'm going to 
figure out why.

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.8.12, 1.10.2
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-25 Thread JIRA


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

Michael Dürig commented on OAK-8071:


[~ahanikel], if you could also have a look at this one. Branch is here: 
[https://github.com/mduerig/jackrabbit-oak/commits/OAK-8071] [~dulceanu] has 
all the context re. {{LockBasedScheduler}} and the existing monitoring around 
it.

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.8.12, 1.10.2
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-22 Thread JIRA


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

Michael Dürig commented on OAK-8071:


At 
[https://github.com/mduerig/jackrabbit-oak/commit/b1693aac12a863159db36f2b1eba4e5260796d95]
 I added support for
 * exposing time queued, dequeued and applied time stamps per commit currently 
waiting to commit
 * exposing the same for the commit currently in progress.

[~dulceanu], let me know what you think once you got a min.

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.10.1, 1.8.12
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-22 Thread JIRA


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

Michael Dürig commented on OAK-8071:


One missing bit I still would like to add is the garbage collection generation 
a commit belongs to. This would be helpful to determine whether the commit 
crosses a gc boundary and would thus be susceptible of OAK-8014

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.10.1, 1.8.12
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-22 Thread JIRA


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

Michael Dürig commented on OAK-8071:


Thanks for reviewing.
{quote}it didn't seem a problem to miss a few events
{quote}
Ack, that's what I though. I think we need to change this assumption for this 
issue so we don't risk missing a commit that might still end up being queued 
for a long time.

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.10.1, 1.8.12
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-22 Thread Andrei Dulceanu (JIRA)


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

Andrei Dulceanu commented on OAK-8071:
--

[~mduerig], the changes in both commits LGTM.

Regarding our previous discussion about the race condition, I got your point. 
At the time the code was written, it didn't seem a problem to miss a few events 
like this, as the functionality was considered rather an approximation anyways.

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.10.1, 1.8.12
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-22 Thread JIRA


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

Michael Dürig commented on OAK-8071:


[~dulceanu], in summary: performance is not an issue as with the [second 
commit|https://github.com/mduerig/jackrabbit-oak/commit/0dd87632ae6ec2228ac35fcdc8e919982559fb16]
 stack trace collection will not be eager any more. The performance regression 
only shows up when looking at the [first 
commit|https://github.com/mduerig/jackrabbit-oak/commit/fcc2c85182d16e4838645e3a35c43d358c687421]
 in isolation. 

Would be great if you could have another look and double check whether I missed 
something.

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.10.1, 1.8.12
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-22 Thread JIRA


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

Michael Dürig commented on OAK-8071:


Just noted though that removing this check causes a lot of additional commits 
to end up on the {{CommitsTracker#commits}} queue. This causes a performance 
regression in our benchmarks:
{noformat}
Apache Jackrabbit Oak
# FlatTreeUpdateTest   C min 10% 50% 90% max
   N
Oak-Segment-Tar (base) 1    5593    5600    5938    6302    6321
  11
Oak-Segment-Tar (OAK-8071) 1    6849    6849    7076    8821    8821
   9
{noformat}
Will have to look for another solution.

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.10.1, 1.8.12
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-22 Thread JIRA


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

Michael Dürig commented on OAK-8071:


My concern is about missing a thread that might get queued: when a permit is 
available when checking but then later the lock is already taken by another 
thread. In this case the thread waiting for the lock will not be marked as 
queued.

When we remove this extra check all threads will go through this virtual queue. 
Just that most threads will get unqueued quickly again.

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.10.1, 1.8.12
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-21 Thread Andrei Dulceanu (JIRA)


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

Andrei Dulceanu commented on OAK-8071:
--

{quote}Do you remember why this check for the number of available permits was 
put in place?
{quote}
AFAICR, this was the only method for determining if a certain commit will be 
executed right away or will be queued, because the semaphore was already 
acquired.

Regarding your concern about a race condition, I'm not sure how this could 
happen. IMO, the worst thing that could happen is that a thread which initially 
sees that no permits are available is marked as queued, even though the thread 
which acquired the semaphore released it in the mean time (after the if check). 
Following this point, only one thread will be able to execute commits (having 
already acquired the semaphore).

[~mduerig], WDYT about the reasoning above?

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.10.1, 1.8.12
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-21 Thread JIRA


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

Michael Dürig commented on OAK-8071:


At 
[https://github.com/mduerig/jackrabbit-oak/commit/0dd87632ae6ec2228ac35fcdc8e919982559fb16]
 I added a timestamp to the monitoring of the queued commits. At the same time 
I refactored the handling of processing the stack traces a bit deferring their 
evaluation to the point where they are requested.

[~dulceanu], could you have a look?

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.10.1, 1.8.12
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-8071) Logging to detect commits carrying over from previous GC generation can block other threads from committing

2019-02-21 Thread JIRA


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

Michael Dürig commented on OAK-8071:


As prerequisite I propose to remove a potential race condition in the 
monitoring of the {{LockBasedScheduler}}: Always handle commits as queued even 
when the lock is free to avoid races between checking the number of available 
permits and actually acquiring the lock. [~dulceanu], do you remember why this 
check for the number of available permits was put in place? 

See 
[https://github.com/mduerig/jackrabbit-oak/commit/fcc2c85182d16e4838645e3a35c43d358c687421]

> Logging to detect commits carrying over from previous GC generation can block 
> other threads from committing
> ---
>
> Key: OAK-8071
> URL: https://issues.apache.org/jira/browse/OAK-8071
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Michael Dürig
>Priority: Blocker
> Fix For: 1.12, 1.11.0, 1.10.1, 1.8.12
>
>
> Add logging / monitoring to detect the situation from OAK-8014.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)