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

Vikas Saurabh edited comment on OAK-6820 at 10/14/17 6:33 PM:
--------------------------------------------------------------

[~chetanm], a few points:
* while validating existence of superceded index def with declaredNodeTypes and 
_not_ finding type after {{@}} in declaredNodeTypes - maybe we should warn 
(yes, one can check the INFO message at the log... but maybe an explicit warn 
would be useful too)
* Afaics, just setting {{supersedes}} property on an index def could 
potentially disable the indices:
** this diverges a bit from a property on index def taking effect even before 
it gets to the hidden index def (although, I guess, that hidden stored index is 
only relevant for lucene indices)
** Although, point above is a little too specific to lucene... but, maybe this 
feature should at least work only for async indices - sync indices technically 
should be able to handle such cases in a single save anyway (without waiting 
for reindex before disabling)
** continuing with the first point of hidden def - there could be a case where 
we only update the def to supercede an (async) index def but *not* reindex yet 
- that, afaics, would lead to disabling superseded defs in next cycle (as 
{{reindex}} flag wouldn've have changed in the cycle)


was (Author: catholicon):
Patch lgtm. A few points:
* while validating existence of superceded index def with declaredNodeTypes and 
_not_ finding type after {{@}} in declaredNodeTypes - maybe we should warn 
(yes, one can check the INFO message at the log... but maybe an explicit warn 
would be useful too)
* Afaics, just setting {{supersedes}} property on an index def could 
potentially disable the indices:
** this diverges a bit from a property on index def taking effect even before 
it gets to the hidden index def (although, I guess, that hidden stored index is 
only relevant for lucene indices)
** Although, point above is a little too specific to lucene... but, maybe this 
feature should at least work only for async indices - sync indices technically 
should be able to handle such cases in a single save anyway (without waiting 
for reindex before disabling)
** continuing with the first point of hidden def - there could be a case where 
we only update the def to supercede an (async) index def but *not* reindex yet 
- that, afaics, would lead to disabling superseded defs in next cycle (as 
{{reindex}} flag wouldn've have changed in the cycle)

> Implement support for disabling indexes which are replaced with newer index
> ---------------------------------------------------------------------------
>
>                 Key: OAK-6820
>                 URL: https://issues.apache.org/jira/browse/OAK-6820
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: indexing
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>             Fix For: 1.8
>
>         Attachments: OAK-6820-v1.patch
>
>
> For upgrade case in many applications older index type is set to {{disabled}} 
> when new index is provisioned. If the new index is async then it would take 
> some time for reindex and till then any query which used to make use of old 
> index would end up traversing the repository
> To avoid such a scenario we should only mark older index as "disabled" only 
> if the newer index is reindex. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to