rocksdb/thrift
Dhruba Borthakur f7975ac733 Implement RowLocks for assoc schema
Summary:
Each assoc is identified by (id1, assocType). This is the rowkey.
Each row has a read/write rowlock. There is statically allocated array
of 2000 read/write locks. A rowkey is murmur-hashed to one of the
read/write locks.

assocPut and assocDelete acquires the rowlock in Write mode.
The key-updates are done within the rowlock with a atomic nosync
batch write to leveldb. Then the rowlock is released and
a write-with-sync is done to sync leveldb transaction log.

Test Plan: added unit test

Reviewers: heyongqiang

Reviewed By: heyongqiang

Differential Revision: https://reviews.facebook.net/D5859
2012-10-03 23:19:01 -07:00
..
bin Expose new configration variables via the thrift api 2012-08-17 10:29:12 -07:00
folly Implement the FB-Assoc API via thrift. 2012-08-01 16:18:24 -07:00
gen-cpp Expose new configration variables via the thrift api 2012-08-17 10:29:12 -07:00
if Expose new configration variables via the thrift api 2012-08-17 10:29:12 -07:00
lib/cpp Implement the FB-Assoc API via thrift. 2012-08-01 16:18:24 -07:00
libs Implement the FB-Assoc API via thrift. 2012-08-01 16:18:24 -07:00
test Implement RowLocks for assoc schema 2012-10-03 23:19:01 -07:00
assoc.h Implement RowLocks for assoc schema 2012-10-03 23:19:01 -07:00
openhandles.h Encode id1Type, id2Type and data version the assoc payload. 2012-08-02 14:09:13 -07:00
README Expose new configration variables via the thrift api 2012-08-17 10:29:12 -07:00
server_options.h leveldb thrift server uses an incorrect root directory 2012-08-16 11:10:08 -07:00
server_utils.cpp Expose new configration variables via the thrift api 2012-08-17 10:29:12 -07:00
server.cpp Make leveldb server not exit immediately. 2012-08-03 01:00:35 -07:00

This directory has the thrift server code that exposes leveldb apis.

The thrift api is specified in thrift/if/leveldb.thrift. 

The thrift header files are in ./thrift/lib. These are part of 
Apache Thrift code base and are needed for compilation of the leveldb
thrift server. The thrift libraries are copied into ./thrift/libs.
If you want to use a different version of thrift, please update these
directories with the corresponding thrift header files and the
compiled thrift libraries.

If you want to compile leveldb with thrift-server support, please set the following
enviroment variables appropriately:
   USE_THRIFT=1
   LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./thrift/libs:./snappy/libs
   make clean leveldb_server leveldb_server_test

You can run the leveldb server unit tests by
  ./leveldb_server_test

You can regenerate the thrift cpp files by doing the following

cd ./thrift
bin/thrift --gen cpp if/leveldb.thrift