Comments (3)
Quoting the docs for the benefit of others finding this ticket:
MDB_MULTIPLE - store multiple contiguous data elements in a single request. This flag may only be specified if the database was opened with MDB_DUPFIXED. The data argument must be an array of two MDB_vals. The mv_size of the first MDB_val must be the size of a single data element. The mv_data of the first MDB_val must point to the beginning of the array of contiguous data elements. The mv_size of the second MDB_val must be the count of the number of data elements to store. On return this field will be set to the count of the number of elements actually written. The mv_data of the second MDB_val is unused.
This is currently unsupported by LmdbJava.
Internally LmdbJava's BufferProxy
populates MDB_val
s with the required size (length) and pointer to data. We could amend our approach to always reserve space for two MDB_val
s, but the different BufferProxy
implementations would still require a way to determine the size of each data element and the count of data elements. The main buffers (eg DirectBuffer
, ByteBuffer
) do not have a field to communicate such details, so we'd need to overload Cursor.put(T, T, PutFlags...)
to support these additional arguments and pass them through to BufferProxy
via amended in
methods (I'd suggest just adding the data count and element size to each in
method and the former remains 1
for all existing calls).
Overall it's a reasonable amount of complexity and effort to make this possible. Can I ask about your use case?
from lmdbjava.
Thank you for the clarification.
I am bulk loading an adjacency list for a large graph (key = vertex, data = neighbours). I have the complete list of neighbours for each vertex in sorted order. I append each neighbour using a call to put
with the PutFlags/MDB_APPENDDUP
flag.
The graph is dense: I have many more edges than vertices. I wanted to check if I could make one call to put
per vertex rather than per edge and what impact that would have on performance.
from lmdbjava.
I'll close this ticket, as I've created a new one (#28) to track the new feature request.
from lmdbjava.
Related Issues (20)
- project panama HOT 1
- Unable to make field long java.nio.Buffer.address accessible HOT 2
- release of lmdbjava-0.8.3 HOT 4
- Seeing records that are malformed/corrupted after write HOT 15
- Compatibility with Java 19 - Modularize? Minimizing use of unsupported JDK parts? HOT 3
- Is it possible to make Dbi constructor accessible from outside? HOT 1
- Version 0.8.3 broken...? HOT 20
- ByteBuf.nioBuffer() returns a buffer with all zeros HOT 2
- Is lmdb has some problems which exists in go version? HOT 5
- mdb_page_flush crash HOT 2
- Having issues allocating a reasonable map size on Windows HOT 1
- There was an error in the forked process HOT 2
- Why does LMDB need to know how large our DB might be? HOT 3
- Entries not having expected values HOT 6
- New release date? HOT 5
- lmdb-java throws UnsatisfiedLinkError on M2 macOS HOT 4
- CursorIterable/KeyRange broken in v0.9.0 HOT 2
- Crash with 0.7.0 when maxNumReaders exceeded
- ByteBuffer sorting changed in 0.9.0 HOT 12
- Page Full Exception on Apple Silicon
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lmdbjava.