Upgrade Lucene from 6.6.2 to 8.2.0 in Apache Geode 1.9.0

214 Views Asked by At

I need to upgrade lucene core dependencies from version 6.6.2 to 8.2.0 in Apache Geode version 1.9.0. Simply removing old lucene core dependencies and adding lucene 8.2.0 dependency gives me the following error while loading data in Geode with lucene index enabled.

[warn 2019/09/21 14:54:57.395 GMT <Pooled Waiting Message Processor 9> tid=0x62] Task failed with exception                                     
java.lang.AbstractMethodError: org.apache.lucene.store.Directory.getPendingDeletions()Ljava/util/Set;                                           
        at org.apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java:212)                                                         
        at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:898)                                                                     
        at org.apache.geode.cache.lucene.internal.IndexRepositoryFactory.finishComputingRepository(IndexRepositoryFactory.java:123)             
        at org.apache.geode.cache.lucene.internal.IndexRepositoryFactory.computeIndexRepository(IndexRepositoryFactory.java:66)                 
        at org.apache.geode.cache.lucene.internal.PartitionedRepositoryManager.computeRepository(PartitionedRepositoryManager.java:148)         
        at org.apache.geode.cache.lucene.internal.PartitionedRepositoryManager.lambda$computeRepository$1(PartitionedRepositoryManager.java:167)
        at java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1853)                                                          
        at org.apache.geode.cache.lucene.internal.PartitionedRepositoryManager.computeRepository(PartitionedRepositoryManager.java:159)         
        at org.apache.geode.cache.lucene.internal.LuceneBucketListener.lambda$afterPrimary$0(LuceneBucketListener.java:40)                      
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)                                                      
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)                                                      
        at org.apache.geode.distributed.internal.ClusterDistributionManager.runUntilShutdown(ClusterDistributionManager.java:960)               
        at org.apache.geode.distributed.internal.ClusterDistributionManager.doWaitingThread(ClusterDistributionManager.java:850)                
        at org.apache.geode.internal.logging.LoggingThreadFactory.lambda$newThread$0(LoggingThreadFactory.java:121)                             
        at java.lang.Thread.run(Thread.java:748)         

Can I get some help please ?

2

There are 2 best solutions below

0
Juan Ramos On

You're manually changing the version of a library internally used by Geode from 6.x to 8.x, this is a major upgrade and probably involves some non-backward compatibility changes, that's why you're receiving this exception: it's a really bad (and generally unsupported) practice to manually change library versions of a framework you don't control, specially without testing those changes first.

I'd suggest to open a ticket asking for this improvement through the GEODE JIRA site.

Cheers.

0
user1792551 On

After a major release the last code might work as the code is written using old API, you have to ask the same to code maintainers.