0

I'm trying to use chronicle map as off heap map for my project. When I try to put a value in the chronicle map, I'm getting the below error.

This error comes when searchStatePresent() is true. I don't know what is this and there is not much information available.

Does anyone have any idea?

Exception in thread "main" java.lang.AssertionError
        at net.openhft.chronicle.map.impl.CompiledMapQueryContext.putNewVolatile(CompiledMapQueryContext.java:3975)
        at net.openhft.chronicle.map.impl.CompiledMapQueryContext.putEntry(CompiledMapQueryContext.java:3990)
        at net.openhft.chronicle.map.impl.CompiledMapQueryContext.doInsert(CompiledMapQueryContext.java:4176)
        at net.openhft.chronicle.map.MapEntryOperations.insert(MapEntryOperations.java:153)
        at net.openhft.chronicle.map.impl.CompiledMapQueryContext.insert(CompiledMapQueryContext.java:4099)
        at net.openhft.chronicle.map.MapMethods.put(MapMethods.java:89)
        at net.openhft.chronicle.map.VanillaChronicleMap.put(VanillaChronicleMap.java:901)
Federico klez Culloca
  • 26,308
  • 17
  • 56
  • 95
Ritu Bhandari
  • 291
  • 2
  • 4
  • 8
  • Please read [ask]. – tgdavies Jun 13 '22 at 05:46
  • @tgdavies oh wow, thank you for your help and for being so generous. Can you please edit it also? I would love to see how you would have asked it. It'll help me for sure. – Ritu Bhandari Jun 13 '22 at 05:59
  • I can't edit it, as I don't have access to your code. You need to edit your question and add a complete, minimal, reproducible example which illustrates your problem. – tgdavies Jun 13 '22 at 06:19

1 Answers1

0

This suggests there is an inconsistency, possibly in your hashCode/equals.

The map attempted to find the key but couldn't find it initially, however when it went to insert the key/value it found it was already there.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130