+1 -Dan
On Thu, Sep 7, 2017 at 9:14 PM, Nabarun Nag <n...@apache.org> wrote: > *Proposal:* > * Index interface will include an API - isValid() which will return true if > the index is still valid / uncorrupted, else will return false if it > corrupted / invalid. > * gfsh command "list index" will have one more column "Is Valid" which will > state the status as "true" or "false". > * Invalid indexes will not be used during query executions. > * In case the index is found to be invalid, the user will be able to > remove/destroy the index. > * When a put operation corrupts an index, it will be logged. > > *Reasoning:* > * Currently if a put operation raises an exception while updating the > index, the put operation fails with an exception to the putter. > * For example, if an index is created on an object method, and that method > causes an exception while updating the index as a part of a put operation, > then the put operation fails for that particular entry and the index is > left in a bad state. > * This may occur also due to lack of permission to update index but have > permission to do puts. > * We are proposing that in the above mentioned scenarios, the put succeeds > in putting the entry in the region but the index which it was trying to > update will be marked invalid and will not be used for query executions. > * This can be justified because the corrupted index will not correctly > represent the region entries. > > *Status Quo:* > * Index creation will still fail if we are trying to create an index over a > region containing an entry/entries which will cause an exception while > loading the entry into the index. > > Regards > Nabarun Nag >