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

Julian Reschke edited comment on OAK-8648 at 9/27/19 2:09 PM:
--------------------------------------------------------------

As far as I can tell, there are two reasons why a sweep would be started:

1. Because there is no sweep revision yet on the root document (for that 
cluster id). So this would be expected once for any existing cluster id 
migrating to 1.8.*, or a a new cluster id.

2. Presence of "garbage commits" in the DocumentNodeStore instance.

Case 2) doesn't seem to be possible upon startup, which leaves us with 1). 
[~mreutegg], does this sound right?

So for {{backgroundSweep()}}, I'd suggest generating a string that describes 
the reason for the sweep, to be passed to {{forceBackgroundSweep()}}. The 
latter already logs on startup, but only on DEBUG level; this is a bit weird, 
as later on pogress reporting happens on INFO level. If 
{{forceBackgroundSweep()}} indeed happens seldomly, maybe it would be best to 
log uncondtionally on INFO level here?


was (Author: reschke):
As far as I can tell, there are two reasons why a sweep would be started:

1. Because there is no sweep revision yet on the root document (for that 
cluster id). So this would be expected once for any existing cluster id 
migrating to 1.8.*, or a a new cluster id.

2. Presence of "in doubt commits" in the DocumentNodeStore instance.

Case 2) doesn't seem to be possible upon startup, which leaves us with 1). 
[~mreutegg], does this sound right?

So for {{backgroundSweep()}}, I'd suggest generating a string that describes 
the reason for the sweep, to be passed to {{forceBackgroundSweep()}}. The 
latter already logs on startup, but only on DEBUG level; this is a bit weird, 
as later on pogress reporting happens on INFO level. If 
{{forceBackgroundSweep()}} indeed happens seldomly, maybe it would be best to 
log uncondtionally on INFO level here?

> Log reason why NodeDocumentSweeper.sweep is called
> --------------------------------------------------
>
>                 Key: OAK-8648
>                 URL: https://issues.apache.org/jira/browse/OAK-8648
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: documentmk
>    Affects Versions: 1.8.9
>            Reporter: Vincent Frey
>            Assignee: Julian Reschke
>            Priority: Minor
>
> It can happen during a  cluster node restart, that a 
> NodeDocumentSweeper.sweep is triggered.
> Depending on the number of nodes, this can delay the start process for 
> several hours.
> In order to understand what caused the sweep, it could be interesting to log 
> (INFO level) the reason why it has been triggered.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to