jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Parvulescu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-4400) Correlate index with the index definition used to build it
Date Wed, 07 Dec 2016 19:48:58 GMT

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

Alex Parvulescu commented on OAK-4400:

I think v3 looks good.

First, I have an incredibly minor thing related to the {{IndexDefinition}} log, some suggestions:
* "Feature to ensure that index definition match the index state is set to be disabled." ->
"Feature to ensure that index definition match the index state is disabled."
* "index definition would now effect query plans and might lead to inconsistent results" ->
"index definition would now affect query plans and might lead to inconsistent results."

Second, similar to what Vikas pointed to, I find the feature flag usage a bit confusing, specifically
the parts where the {{LuceneIndexEditorContext}} sets the referenced node state. while {{enableReindexMode}}
respects the flag, {{createIndexDefinition}} doesn't, so I'm wondering if this won't create
an inconsistency for those who need to temporarily disable the feature (and possibly reindex)
and enable it again later. maybe one idea is to add a cleanup phase where the code will take
care of removing exiting {{:index-definition}} in the presence of the disabled flag.

> Correlate index with the index definition used to build it
> ----------------------------------------------------------
>                 Key: OAK-4400
>                 URL: https://issues.apache.org/jira/browse/OAK-4400
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: lucene, query
>    Affects Versions: 1.4
>            Reporter: Valentin Olteanu
>            Assignee: Chetan Mehrotra
>             Fix For: 1.6
>         Attachments: OAK-4400-v1.diff, OAK-4400-v2.diff, OAK-4400-v3.diff, lucene-mbean.png
> Currently, if the definition of an index is changed without reindexing, it will get in
an "inconsistent" state. 
> Of course, the reindexing is usually necessary, but it would be useful to know with which
definition the index was built. This could increase the visibility of the indexing state and
help debugging issues related to it.
> Some questions this improvement should respond to:
> # What is the definition of the index when the (re)indexing was triggered?
> # Are there any changes in the definition since the trigger? Which?
> I can imagine a solution built by "versioning" the definition nodes (oak:QueryIndexDefinition).
When the reindex is triggered, a new version of the node is created and the indexer stores
a reference to it.
> This would also allow the indexer to keep using the same definition until a new reindex,
even if changes are made meanwhile (i.e. use a fixed version instead of the latest definition).

This message was sent by Atlassian JIRA

View raw message