basho / eleveldb

Erlang LevelDB API
262 stars 177 forks source link

RTS-997: Merge with KV to get LevelDB 2.0.15 #184

Closed hazen closed 8 years ago

hazen commented 8 years ago

Probably more than what was needed, but is going to really help the Grand Unification with KV next quarter.

Brian's performance tests don't show any significant changes and TS riak_tests all pass.

riak_ts-develop - 130,026.26 ops/s
eleveldb branch - 134,886.78 ops/s
erikleitch commented 8 years ago

+1

Summary

Mostly straightforward replacement of eleveldb threading with leveldb::HotThreadPool equivalents.

Files details.cpp, mutex.h, threading.h/cc removed because their functionality has been subsumed into leveldb threading code.

eleveldb.cc modified to replace eleveldb thread_pool refs with levelb::HotThreadPool equivalents. refobjects.h/cc modified to extend RefObject from leveldb::RefObjectBase, ErlRefObject and DbObject now use leveldb::Mutex and CondVar classes instead of bare pthread variants.

workitems.cc modified to replace subclassed operator()() with DoWork(), which is now called from a single base-class operator()(), which also wraps notifying the erlang caller of results.

Minor modifications in eleveldb.cc, eleveldb.schema and eleveldb.erl to add cache warming options and atoms.

Comments