Cache.RemoveIndex Does Not Seem To Remove The Index (Doc ID 876422.1)

Last updated on NOVEMBER 03, 2016

Applies to:

Oracle Coherence - Version 2.5.1 to 3.5.0
Information in this document applies to any platform.
***Checked for relevance on 02-Jan-2014***


When a.NET application calls Cache.RemoveIndex()  the index on the cache does not seem to be removed (The same will happen with a Java application).

Code like:

INamedCache cache = CacheFactory.GetCache("dist-cache");

// create a POF-based index on some first value in the stream
PofExtractor extractor = new PofExtractor(0);
cache.AddIndex(extractor, false, null);

// drop the index - should be removed so no problem is caused
cache.RemoveIndex(extractor); // <<-- does this method fail?

// wait a few seconds in case the index removal is asynchronous
// to allow removal to complete
System.Console.Out.WriteLine("Test going on");

// insert a value incompatible with the POF extractor index
// should be no problem beacuae the index has been removed
// appears the RemoveIndex() method fails

cache.Add(key, val); // <<-- this line causes an exception
                     //      in the cache server log


runs into PofNavigationException on the cache server:

2009-07-10 14:27:25.781/29.313 Oracle Coherence GE 3.5/459 <Error> (thread=DistributedCache, member=1): Exception occured during index update: key; removing the index...
2009-07-10 14:27:25.781/29.313 Oracle Coherence GE 3.5/459 <Error> (thread=DistributedCache, member=1): getChild() method cannot be invoked on the SimplePofValue instance.
at com.tangosol.util.extractor.PofExtractor.extractFromEntry(
at com.tangosol.util.InvocableMapHelper.extractFromEntry(
at com.tangosol.util.SimpleMapIndex.insert(
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.updateIndex(DistributedCache.CDB:19)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.postInvoke(DistributedCache.CDB:6)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.put(DistributedCache.CDB:156)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onPutRequest(DistributedCache.CDB:37)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)

This shows that when the cache.Add() is executed the index still exists and has not been removed.


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms