You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by "Dan Smith (JIRA)" <ji...@apache.org> on 2016/12/19 23:51:58 UTC
[jira] [Resolved] (GEODE-2216) PartitionedRegion.createIndexes
ignores exceptions, resulting in corrupt indexes
[ https://issues.apache.org/jira/browse/GEODE-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Smith resolved GEODE-2216.
------------------------------
Resolution: Fixed
Assignee: Dan Smith (was: Mark Bretl)
Fix Version/s: 1.1.0
> PartitionedRegion.createIndexes ignores exceptions, resulting in corrupt indexes
> --------------------------------------------------------------------------------
>
> Key: GEODE-2216
> URL: https://issues.apache.org/jira/browse/GEODE-2216
> Project: Geode
> Issue Type: Bug
> Components: querying
> Reporter: Dan Smith
> Assignee: Dan Smith
> Fix For: 1.1.0
>
>
> I tried to create an index on a region with objects that could not be deserialized (it was a mistake in my code). I found that it actually *allowed* me to create the index, but my values were not actually indexed.
> Looking at the code in PartitionedRegion.createIndexes, it has some interesting code to maintain a boolean flag that an exception should be thrown. However, it keeps losing the value of the flag. Here's some of the code:
> {code}
> boolean throwException = false;
> ...
> throwException =
> createEmptyIndexes(indexDefinitions, remotelyOriginated, indexes, exceptionsMap);
> ...
> //This overwrites the value of throwException
> if (unpopulatedIndexes != null && unpopulatedIndexes.size() > 0) {
> throwException = populateEmptyIndexes(unpopulatedIndexes, exceptionsMap);
> }
> //Same thing here
> throwException =
> sendCreateIndexesMessage(remotelyOriginated, indexDefinitions, indexes, exceptionsMap);
> {code}
> This method should always throw an exception if the index creation failed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)