jankotek / mapdb

MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap-memory. It is a fast and easy to use embedded Java database engine.
https://mapdb.org
Apache License 2.0
4.9k stars 872 forks source link

RFE: BTreeMap allow counter be implemented by j.u.c.AtomicLong #439

Closed jandam closed 9 years ago

jandam commented 9 years ago

There is optimization for sizeLong by using Atomic.Long to skip iteration. For temporary tables there can be counter implemented by j.u.c.AtomicLong to minimize overhead. Every CAS on counter writes record to disk. For temporary tables that will be deleted after close. It be only in memory.

jandam commented 9 years ago

I suggest deffer this issue to next version. There is simple workaround with self implementing Bind.size on AtomicLong.

jankotek commented 9 years ago

Not going to fix this.