albertogpz commented on a change in pull request #6110:
URL: https://github.com/apache/geode/pull/6110#discussion_r592153382
##########
File path:
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/CompactRangeIndexJUnitTest.java
##########
@@ -442,6 +445,48 @@ public void doTestHook(final SPOTS spot, final
DefaultQuery _ignored,
}
}
+ /**
+ * Tests adding entries to compact range index where there are undefined and
null values
+ * for the key
+ */
+ @Test
+ public void testNullAndUndefinedValuesForMapKeyInCompactRangeIndex() throws
Exception {
Review comment:
Unfortunately, I have not found a way.
The flakyness has to do with some randomness in the
`ConcurrentSkipListMap::putIfAbsent()` method invoked from
`MemoryIndexStore::updateMapping()` on the `valueToEntriesMap` member that
seems to traverse the Map in different order in different executions. With the
bug in the Comparator, when adding an entry with UNDEFINED key to the
valueToEntriesMap, when there was already an entry with that key in the Map,
sometimes that was not detected (an entry with NullToken was found first and
that prevented looking for the UNDEFINED key in another entry) and several
entries with the UNDEFINED key ended up in the Map.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]