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

Tom Duffey commented on JCR-5142:
---------------------------------

I'm looking ahead to the other piece of this which is the need to similarly 
pause/resume the MultiIndex from changing anything on disk.

It seems this includes at least the following operations.
 # Committing the volatile index to the persistent index. Looks like this can 
be triggered by either an update action or the `flush()` method which is a 
scheduled task and also the recovery process. In any case seems like a lock 
would be needed around the `flush()` method and also the 
`checkVolatileCommit()` method.
 # The index merging process implemented in `IndexMerger`. This thing seems to 
already have a lock so perhaps it could be exposed or pause/resume methods 
added.

I hate to touch this code due to the complexities around multi-threading and 
potential deadlocks. Not to mention this is my first time diving into the 
depths of Jackrabbit. But it does seem necessary to ensure a consistent index 
backup, no?

> Improve index hot backup
> ------------------------
>
>                 Key: JCR-5142
>                 URL: https://issues.apache.org/jira/browse/JCR-5142
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: clustering, indexing
>    Affects Versions: 2.23.1
>            Reporter: Tom Duffey
>            Priority: Minor
>
> As a user with high performance and resiliency needs Jackrabbit should 
> provide a way to do a hot backup of the Lucene index to avoid having to take 
> a node offline.
> As a step in that direction ClusterNode should provide a way to pause and 
> resume synchronization. This way we can pause updates on a node, backup the 
> index and then resume.
> Note this ticket only proposes handling the JCR cluster sync operation but 
> the node itself could also be updating its index. Perhaps a second ticket 
> could be made to also pause merging the volatile indexes back to the 
> persistent indexes?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to