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

Francesco Mari commented on OAK-5351:
-------------------------------------

The problem might be more involved than expected because of the role played by 
the {{GCMonitor}}. For the correctness of the 1.6 release, I suggest to do the 
following.

For a primary store:

* Configure the {{FileStore}} to use a {{GCMonitorTracker}}. The primary store 
is the only one who should notify {{GCMonitor}} instances about GC events.
* Register a {{FileStoreGCMonitor}}. You need this to collect GC events and 
aggregate them for reporting.
* Register a {{SegmentRevisionGCMBean}}. You need this for GC operations at the 
abstraction level of the segment store.
* Register a {{RevisionGCMBean}}. You need this for GC operations on an 
abstraction level higher than the segment store.

For a secondary store:

* Configure the {{FileStore}} to use {{GCMonitor.EMPTY}}. Secondary store 
shouldn't send out notifications related to GC events.
* Don't register a {{FileStoreGCMonitor}}. There is no need to register this 
component twice, especially because secondary stores don't notify {{GCMonitor}} 
instances.
* Don't register a {{SegmentRevisionGCMBean}}, because there is no 
{{FileStoreGCMonitor}} specific to the secondary store.
* Don't register a {{RevisionGC}}, because there is no 
{{SegmentRevisionGCMBean}} specific to the secondary store.

This is the only solution [~mduerig] and me figured out that would preserve the 
correctness of the monitoring infrastructure for the segment store. This 
solution has the drawback that GC is not available on secondary store, but it 
seems to be the only viable option given the remaining time before the 1.6 
release. To make GC work properly on secondary stores there is way more work 
needed, especially regarding the downstream implementors of {{GCMonitor}}. 

> Disable RevisionGCMBean registration for non primary SegmentNodeStore
> ---------------------------------------------------------------------
>
>                 Key: OAK-5351
>                 URL: https://issues.apache.org/jira/browse/OAK-5351
>             Project: Jackrabbit Oak
>          Issue Type: Task
>          Components: segment-tar
>            Reporter: Chetan Mehrotra
>            Assignee: Francesco Mari
>            Priority: Minor
>             Fix For: 1.5.17, 1.6
>
>
> As discussed 
> [here|https://issues.apache.org/jira/browse/OAK-4978?focusedCommentId=15750371&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15750371]
>  untill OAK-5309 is not resolved we need to disable registration of 
> {{RevisionGCMBean}} for non primary SegmentNodeStore such that RevisionGC for 
> primary NodeStore can work properly.
> So for 1.6 release 
> # SegmentNodeStoreServiceFactory would not register RevisionGCMBean in OSGi 
> # A user can still perform the revision gc by looking up 
> {{SegmentRevisionGC}} service
> # Primary nodestore RevisionGCMBean would be registered as being done 
> currently



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to