Coder Social home page Coder Social logo

Comments (14)

ptoews avatar ptoews commented on May 26, 2024 1

I'm currently trying to reduce the code for reproducing the error as well, and it looks like it depends on an outer layer that I didn't include here. I'll keep you updated if there maybe is a mistake on my side.

from nitrite-java.

ptoews avatar ptoews commented on May 26, 2024 1

Nevermind that, I just didn't get the exception sometimes randomly.
So here is the reduced code that definitely threw one for me:
https://pastebin.com/kk9P06sG

from nitrite-java.

anidotnet avatar anidotnet commented on May 26, 2024

Could you please post the complete code here for both nitrite and mvstore alone to reproduce this error?

from nitrite-java.

ptoews avatar ptoews commented on May 26, 2024

I've tested it with another dataset with ~270k entries that worked fine as well.
The project is really big and many classes are involved, so I hope the adapter classes are enough for you:

NitriteDB:
Constructing DB:

Nitrite db = Nitrite.builder().compressed()
			.filePath(storageDir + File.separatorChar + DB_FILE).openOrCreate();
NitriteCollection collection = db.getCollection(COLLECTION_NAME);
this.collectionAccessor = new CollectionAccessor(db, collection);

CollectionAccessor.java: https://pastebin.com/N63681vg
IteratorWrapper.java: https://pastebin.com/vpeXUMcE

MVStore:
H2MVStoreMultiMap.java: https://pastebin.com/V8wsUXP2
IteratorWrapper is basically the same, without the document converting.

from nitrite-java.

anidotnet avatar anidotnet commented on May 26, 2024

MVStore example is not giving this exception is because you are creating only one map there. But in nitrite, it creates 6 maps - 1 for collection, 3 for indices, 2 for meta information.

Can you please do me a favor and create 4 mvmaps in mvstore example and insert data in all of them simultaneously in the same fashion? I just need to confirm if it is the volume of data that is creating problem or not. I might take this case to mvstore developers, so it will be better if I give as much info as possible.

from nitrite-java.

ptoews avatar ptoews commented on May 26, 2024

I forgot to mention that H2MVStoreMutliMap class is instantiated three times.
But why do you want me to create only 4 mvmaps? What are the other two for then, because indexing should be enabled there too.

However, instantiating my MVStore multimap both 4 and 6 times works without problems.

from nitrite-java.

anidotnet avatar anidotnet commented on May 26, 2024

I just want to make sure, you are creating 4 mvmaps in the same store and inserting 1 million of records in each of them parallely right?

I asked for 4 mvmaps, as other 2 are meta maps, it contains only few records, so does not contribute to this problem at all.

from nitrite-java.

ptoews avatar ptoews commented on May 26, 2024

I just want to make sure, you are creating 4 mvmaps in the same store and inserting 1 million of records in each of them parallely right?

Yes, exactly.

from nitrite-java.

anidotnet avatar anidotnet commented on May 26, 2024

Thank you. Let me re-create the scenario and see what can be done about this.

from nitrite-java.

anidotnet avatar anidotnet commented on May 26, 2024

Thanks a lot for the time. I am looking into it.

from nitrite-java.

anidotnet avatar anidotnet commented on May 26, 2024

Fix is ready in 2.1.1-SNAPSHOT. Please test and confirm

from nitrite-java.

ptoews avatar ptoews commented on May 26, 2024

I'm using Nitrite via Maven, but it's not available there yet?

from nitrite-java.

anidotnet avatar anidotnet commented on May 26, 2024

https://oss.sonatype.org/content/repositories/snapshots/org/dizitart/nitrite/2.1.1-SNAPSHOT/

You need to add snapshot repo https://oss.sonatype.org/content/repositories/snapshots in maven pom

from nitrite-java.

ptoews avatar ptoews commented on May 26, 2024

Thanks. Yes, now it works.

from nitrite-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.