Commit Graph

12 Commits

Author SHA1 Message Date
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
Dhruba Borthakur
a321d5be9e Implement assocDelete.
Summary: Implement assocDelete.

Test Plan: unit test attached

Reviewers: heyongqiang

Reviewed By: heyongqiang

CC: MarkCallaghan

Differential Revision: https://reviews.facebook.net/D5721
2012-10-01 09:58:26 -07:00
Dhruba Borthakur
b56ff5ea38 Expose new configration variables via the thrift api
Summary: Expose new configration variables via the thrift api. when compiing for fbcode, always build thrift server

Test Plan: none.

Reviewers: heyongqiang

Reviewed By: heyongqiang

Differential Revision: https://reviews.facebook.net/D4689
2012-08-17 10:29:12 -07:00
Dhruba Borthakur
7c0b5ec54a leveldb thrift server uses an incorrect root directory
Summary: The offsets used to speficy hostname and dbdir from the command line were not handled correctly.

Test Plan: none.

Reviewers: heyongqiang

Reviewed By: heyongqiang

Differential Revision: https://reviews.facebook.net/D4683
2012-08-16 11:10:08 -07:00
Dhruba Borthakur
c44be54dd2 Make leveldb server not exit immediately.
Summary:

Test Plan:

Reviewers:

CC:

Task ID: #

Blame Rev:
2012-08-03 01:00:35 -07:00
Dhruba Borthakur
88c515b6ba Implement taoAssocRangeGet().
Summary:

Test Plan:

Reviewers:

CC:

Task ID: #

Blame Rev:
2012-08-03 00:27:48 -07:00
Dhruba Borthakur
0c98fdcf27 Encode id1Type, id2Type and data version the assoc payload.
Summary:

Test Plan:

Reviewers:

CC:

Task ID: #

Blame Rev:
2012-08-02 14:09:13 -07:00
Dhruba Borthakur
a3a8f83482 Fix "gcc -Wall" warnings for assoc-thrift code.
Summary:

Test Plan:

Reviewers:

CC:

Task ID: #

Blame Rev:
2012-08-01 17:28:35 -07:00
Dhruba Borthakur
b40ad060e0 Implement the FB-Assoc API via thrift.
Summary:

Test Plan:

Reviewers:

CC:

Task ID: #

Blame Rev:
2012-08-01 16:18:24 -07:00
Dhruba Borthakur
d5503208cf Share a single cache for all the DBs served by this server.
Summary:

Test Plan:

Reviewers:

CC:

Task ID: #

Blame Rev:
2012-07-11 14:08:46 -07:00
Dhruba Borthakur
bfaa1bd26c Cleanup thrift header files.
Move thrift api  from thrift/leveldb.thrift to thrift/if/leveldb.thrift

Summary:

Test Plan:

Reviewers:

CC:

Task ID: #

Blame Rev:
2012-07-10 10:19:49 -07:00
Dhruba Borthakur
80c663882a Create leveldb server via Thrift.
Summary:
First draft.
Unit tests pass.

Test Plan: unit tests attached

Reviewers: heyongqiang

Reviewed By: heyongqiang

Differential Revision: https://reviews.facebook.net/D3969
2012-07-07 09:42:39 -07:00