1. 06 11月, 2013 1 次提交
  2. 01 11月, 2013 1 次提交
  3. 29 10月, 2013 2 次提交
    • S
      Make "Table" pluggable · d4eec30e
      Siying Dong 提交于
      Summary: This patch makes Table and TableBuilder a abstract class and make all the implementation of the current table into BlockedBasedTable and BlockedBasedTable Builder.
      
      Test Plan: Make db_test.cc to work with block based table. Add a new test simple_table_db_test.cc where a different simple table format is implemented.
      
      Reviewers: dhruba, haobo, kailiu, emayanke, vamsi
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D13521
      d4eec30e
    • K
      Support user-defined table stats collector · 994575c1
      Kai Liu 提交于
      Summary:
      1. Added a new option that support user-defined table stats collection.
      2. Added a deleted key stats collector in `utilities`
      
      Test Plan:
      Added a unit test for newly added code.
      Also ran make check to make sure other tests are not broken.
      
      Reviewers: dhruba, haobo
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D13491
      994575c1
  4. 24 10月, 2013 1 次提交
    • I
      BlobStore Benchmark · 7e2c1ba1
      Igor Canadi 提交于
      Summary:
      Finally, arc diff works again! This has been sitting in my repo for a while.
      
      I would like some comments on my BlobStore benchmark. We don't have to check this in.
      
      Also, I don't do any fsync in the BlobStore, so this is all extremely fast. I'm not sure what durability guarantees we need from the BlobStore.
      
      Test Plan: Nope
      
      Reviewers: dhruba, haobo, kailiu, emayanke
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D13527
      7e2c1ba1
  5. 23 10月, 2013 1 次提交
  6. 17 10月, 2013 1 次提交
    • I
      External Value Store · fc4616d8
      Igor Canadi 提交于
      Summary:
      Developing a capability for storing values on external backing file(s).
      
      This is just a highly unoptimized first pass - supports:
      1) Allocating some portion of external file to be used to store value
      2) Freeing the range, enabling it to be reused by other values
      
      As next steps, I plan to:
      1) Create some kind of stress testing. Once I can measure stuff, I can focus on optimizing.
      2) Optimize locking.
      3) Optimize freelist data structure. Currently we have O(n) for both freeing and allocation.
      4) Figure out how to do recovery.
      
      Test Plan: Created a unit test.
      
      Reviewers: dhruba, haobo, kailiu
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D13389
      fc4616d8
  7. 05 10月, 2013 1 次提交
  8. 23 8月, 2013 3 次提交
    • K
      Fix the gcov/lcov related issues · 4c6dc7a9
      Kai Liu 提交于
      Summary:
      
      Jenkin reports errors that:
      
      * Linking error on some machines. The error message shows it cannot find some gcov related symbols.
      * lcov error due to the version issues.
      
      Test Plan:
      
      run make in different platforms
      
      Reviewers:
      
      CC:
      
      Task ID: #
      
      Blame Rev:
      4c6dc7a9
    • S
      Add APIs to query SST file metadata and to delete specific SST files · 60bf2b7d
      Simha Venkataramaiah 提交于
      Summary: An api to query the level, key ranges, size etc for each SST file and an api to delete a specific file from the db and all associated state in the bookkeeping datastructures.
      
      Notes: Editing the manifest version does not release the obsolete files right away. However deleting the file directly will mess up the iterator. We may need a more aggressive/timely file deletion api.
      
      I have used std::unique_ptr - will switch to boost:: since this is external. thoughts?
      
      Unit test is fragile right now as it expects the compaction at certain levels.
      
      Test Plan: unittest
      
      Reviewers: dhruba, vamsi, emayanke
      
      CC: zshao, leveldb, haobo
      
      Task ID: #
      
      Blame Rev:
      60bf2b7d
    • J
      Do not use relative paths in build system · bc8eed12
      Jim Paton 提交于
      Summary: Previously, RocksDB's build scripts used relative pathnames like ./build_detect_platform. This can cause problems if the user uses CDPATH. Also, it just doesn't seem right to me.
      
      Test Plan:
      make clean
      make -j32 check
      
      Reviewers: MarkCallaghan, dhruba, kailiu
      
      Reviewed By: kailiu
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D12459
      bc8eed12
  9. 20 8月, 2013 1 次提交
    • D
      Merge operator fixes part 1. · e1346968
      Deon Nicholas 提交于
      Summary:
      -Added null checks and revisions to DBIter::MergeValuesNewToOld()
      -Added DBIter test to stringappend_test
      -Major fix with Merge and TTL
      More plans for fixes later.
      
      Test Plan:
      -make clean; make stringappend_test -j 32; ./stringappend_test
      -make all check;
      
      Reviewers: haobo, emayanke, vamsi, dhruba
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D12315
      e1346968
  10. 17 8月, 2013 2 次提交
  11. 16 8月, 2013 1 次提交
    • K
      Clean up the Makefile and the build scripts · 457dcc60
      Kai Liu 提交于
      Summary: As Aaron suggested, there are quite some problems with our Makefile and scripts. So in this diff I did some cleanup for them and revise some part of the scripts/makefile to help people better understand some mysterious parts.
      
      Test Plan:
      Ran make in several modes;
      Ran the updated scripts.
      
      Reviewers: dhruba, emayanke, akushner
      
      Differential Revision: https://reviews.facebook.net/D12285
      457dcc60
  12. 15 8月, 2013 2 次提交
    • J
      Implement log blobs · 0307c5fe
      Jim Paton 提交于
      Summary:
      This patch adds the ability for the user to add sequences of arbitrary data (blobs) to write batches. These blobs are saved to the log along with everything else in the write batch. You can add multiple blobs per WriteBatch and the ordering of blobs, puts, merges, and deletes are preserved.
      
      Blobs are not saves to SST files. RocksDB ignores blobs in every way except for writing them to the log.
      
      Before committing this patch, I need to add some test code. But I'm submitting it now so people can comment on the API.
      
      Test Plan: make -j32 check
      
      Reviewers: dhruba, haobo, vamsi
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D12195
      0307c5fe
    • H
      [RocksDB] Expose thread local perf counter for low overhead, per call level performance statistics. · d9dd2a19
      Haobo Xu 提交于
      Summary:
      As title. No locking/atomic is needed due to thread local. There is also no need to modify the existing client interface, in order to expose related counters.
      
      perf_context_test shows a simple example of retrieving the number of user key comparison done for each put and get call. More counters could be added later.
      
      Sample output
      ./perf_context_test 1000000
      ==== Test PerfContextTest.KeyComparisonCount
      Inserting 1000000 key/value pairs
      ...
      total user key comparison get: 43446523
      total user key comparison put: 8017877
      max user key comparison get: 88939
      avg user key comparison get:43
      
      Basically, the current skiplist does well on average, but could perform poorly in extreme cases.
      
      Test Plan: run perf_context_test <total number of entries to put/get>
      
      Reviewers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D12225
      d9dd2a19
  13. 13 8月, 2013 1 次提交
  14. 06 8月, 2013 1 次提交
  15. 30 7月, 2013 1 次提交
    • J
      Use specific DB name in merge_test · abc90b06
      Jim Paton 提交于
      Summary: Currently, merge_test uses /tmp/testdb for the test database. It should really use something more specific to merge_test. Most of the other tests use test::TmpDir() + "/<test name>db". This patch implements such behavior for merge_test; it makes merge_test use test::TmpDir() + "/merge_testdb"
      
      Test Plan:
      make clean
      make -j32 merge_test
      ./merge_test
      
      Reviewers: dhruba, haobo
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D11877
      abc90b06
  16. 02 7月, 2013 1 次提交
  17. 27 6月, 2013 1 次提交
    • D
      Added stringappend_test back into the unit tests. · 34ef8732
      Deon Nicholas 提交于
      Summary:
      With the Makefile now updated to correctly update all .o files, this
      should fix the issues recompiling stringappend_test. This should also fix the
      "segmentation-fault" that we were getting earlier. Now, stringappend_test should
      be clean, and I have added it back to the unit-tests. Also made some minor updates
      to the tests themselves.
      
      Test Plan:
      1. make clean; make stringappend_test -j 32	(will test it by itself)
      2. make clean; make all check -j 32		(to run all unit tests)
      3. make clean; make release			(test in release mode)
      4. valgrind ./stringappend_test 		(valgrind tests)
      
      Reviewers: haobo, jpaton, dhruba
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D11505
      34ef8732
  18. 26 6月, 2013 1 次提交
    • D
      Updated "make clean" to remove all .o files · 6894a50a
      Deon Nicholas 提交于
      Summary:
      The old Makefile did not remove ALL .o and .d files, but rather only
      those that happened to be in the root folder and one-level deep. This was causing
      issues when recompiling files in deeper folders. This fix now causes make clean
      to find ALL .o and .d files via a unix "find" command, and then remove them.
      
      Test Plan:
      make clean;
      make all -j 32;
      
      Reviewers: haobo, jpaton, dhruba
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D11493
      6894a50a
  19. 18 6月, 2013 1 次提交
  20. 15 6月, 2013 1 次提交
    • D
      Minor tweaks to StringAppend MergeOperator. · 8926b727
      Deon Nicholas 提交于
      Summary:
      I'm concerned about a random seg-fault that sometimes occurs when
      running stringappend_test. I will investigate further. First, I am removing
      stringappend_test from the regular release tests, and making some clean-ups
      to the code.
      
      Test Plan:
      1. make stringappend_test
      2. ./stringappend_test
      
      Reviewers: haobo, dhruba
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D11313
      8926b727
  21. 12 6月, 2013 1 次提交
    • D
      Completed the implementation and test cases for Redis API. · 5679107b
      Deon Nicholas 提交于
      Summary:
      Completed the implementation for the Redis API for Lists.
      The Redis API uses rocksdb as a backend to persistently
      store maps from key->list. It supports basic operations
      for appending, inserting, pushing, popping, and accessing
      a list, given its key.
      
      Test Plan:
        - Compile with: make redis_test
        - Test with: ./redis_test
        - Run all unit tests (for all rocksdb) with: make all check
        - To use an interactive REDIS client use: ./redis_test -m
        - To clean the database before use:       ./redis_test -m -d
      
      Reviewers: haobo, dhruba, zshao
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D10833
      5679107b
  22. 08 6月, 2013 2 次提交
  23. 07 6月, 2013 1 次提交
  24. 14 5月, 2013 1 次提交
    • D
      Implemented StringAppendOperator and unit tests. · accd3deb
      Deon Nicholas 提交于
      Summary:
      Implemented the StringAppendOperator class (subclass of MergeOperator).
      Found in utilities/merge_operators/string_append/stringappend.{h,cc}
      
      It is a rocksdb Merge Operator that supports string/list concatenation
       with a configurable delimiter.
      
      The tests are found in .../stringappend_test.cc. It implements a
       map : key -> (list of strings), with core operations Append(list_key,val)
       and Get(list_key).
      
      Test Plan:
      1. Navigate to your rocksdb repository
      2. Execute: make stringappend_test  (to compile)
      3. Execute: ./stringappend_test (to run the tests)
      4. Execute: make all check (to test the ENTIRE rocksdb codebase / regression)
      
      Reviewers: haobo, dhruba, zshao
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D10737
      accd3deb
  25. 10 5月, 2013 1 次提交
  26. 07 5月, 2013 1 次提交
    • H
      [RocksDB] fix build · 3c4efc44
      Haobo Xu 提交于
      Summary: makefile change: LIBRARY => LIBOBJECTS
      thanks Abhishek for reproducing this locally.
      
      Test Plan: make release
      
      Reviewers: sheki
      
      CC: leveldb
      
      Task ID: #
      
      Blame Rev:
      3c4efc44
  27. 04 5月, 2013 1 次提交
    • H
      [Rocksdb] Support Merge operation in rocksdb · 05e88540
      Haobo Xu 提交于
      Summary:
      This diff introduces a new Merge operation into rocksdb.
      The purpose of this review is mostly getting feedback from the team (everyone please) on the design.
      
      Please focus on the four files under include/leveldb/, as they spell the client visible interface change.
      include/leveldb/db.h
      include/leveldb/merge_operator.h
      include/leveldb/options.h
      include/leveldb/write_batch.h
      
      Please go over local/my_test.cc carefully, as it is a concerete use case.
      
      Please also review the impelmentation files to see if the straw man implementation makes sense.
      
      Note that, the diff does pass all make check and truly supports forward iterator over db and a version
      of Get that's based on iterator.
      
      Future work:
      - Integration with compaction
      - A raw Get implementation
      
      I am working on a wiki that explains the design and implementation choices, but coding comes
      just naturally and I think it might be a good idea to share the code earlier. The code is
      heavily commented.
      
      Test Plan: run all local tests
      
      Reviewers: dhruba, heyongqiang
      
      Reviewed By: dhruba
      
      CC: leveldb, zshao, sheki, emayanke, MarkCallaghan
      
      Differential Revision: https://reviews.facebook.net/D9651
      05e88540
  28. 03 5月, 2013 1 次提交
    • M
      Timestamp and TTL Wrapper for rocksdb · d786b25e
      Mayank Agarwal 提交于
      Summary:
      When opened with DBTimestamp::Open call, timestamps are prepended to and stripped from the value during subsequent Put and Get calls respectively. The Timestamp is used to discard values in Get and custom compaction filter which have exceeded their TTL which is specified during Open.
      Have made a temporary change to Makefile to let us test with the temporary file TestTime.cc. Have also changed the private members of db_impl.h to protected to let them be inherited by the new class DBTimestamp
      
      Test Plan: make db_timestamp; TestTime.cc(will not check it in) shows how to use the apis currently, but I will write unit-tests shortly
      
      Reviewers: dhruba, vamsi, haobo, sheki, heyongqiang, vkrest
      
      Reviewed By: vamsi
      
      CC: zshao, xjin, vkrest, MarkCallaghan
      
      Differential Revision: https://reviews.facebook.net/D10311
      d786b25e
  29. 23 4月, 2013 1 次提交
  30. 21 4月, 2013 1 次提交
    • H
      [RocksDB] Add stacktrace signal handler · 1255dcd4
      Haobo Xu 提交于
      Summary:
      This diff provides the ability to print out a stacktrace when the process receives certain signals.
      Currently, we enable this for the following signals (program error related):
      SIGILL SIGSEGV SIGBUS SIGABRT
      Application simply #include "util/stack_trace.h" and call leveldb::InstallStackTraceHandler() during initialization, if signal handler is needed. It's not done automatically when openning db, because it's the application(process)'s responsibility to install signal handler and some applications might already have their own (like fbcode).
      
      Sample output:
      Received signal 11 (Segmentation fault)
      #0  0x408ff0 ./signal_test() [0x408ff0] /home/haobo/rocksdb/util/signal_test.cc:4
      #1  0x40827d ./signal_test() [0x40827d] /home/haobo/rocksdb/util/signal_test.cc:24
      #2  0x7f8bb183172e /usr/local/fbcode/gcc-4.7.1-glibc-2.14.1/lib/libc.so.6(__libc_start_main+0x10e) [0x7f8bb183172e] ??:0
      #3  0x408ebc ./signal_test() [0x408ebc] /home/engshare/third-party/src/glibc/glibc-2.14.1/glibc-2.14.1/csu/../sysdeps/x86_64/elf/start.S:113
      Segmentation fault (core dumped)
      
      For each frame, we print the raw pointer, the symbol provided by backtrace_symbols (still not good enough), and the source file/line. Note that address translation is done by directly shell out to addr2line. ??:0 means addr2line fails to do the translation. Hacky, but I think it's good for now.
      
      Test Plan: signal_test.cc
      
      Reviewers: dhruba, MarkCallaghan
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D10173
      1255dcd4
  31. 11 4月, 2013 1 次提交
  32. 09 4月, 2013 1 次提交
  33. 06 4月, 2013 1 次提交
  34. 23 3月, 2013 1 次提交
    • S
      Integrate the manifest_dump command with ldb · a8bf8fe5
      Simon Marlow 提交于
      Summary:
      Syntax:
      
         manifest_dump [--verbose] --num=<manifest_num>
      
      e.g.
      
      $ ./ldb --db=/home/smarlow/tmp/testdb manifest_dump --num=12
      manifest_file_number 13 next_file_number 14 last_sequence 3 log_number
      11  prev_log_number 0
      --- level 0 --- version# 0 ---
       6:116['a1' @ 1 : 1 .. 'a1' @ 1 : 1]
       10:130['a3' @ 2 : 1 .. 'a4' @ 3 : 1]
      --- level 1 --- version# 0 ---
      --- level 2 --- version# 0 ---
      --- level 3 --- version# 0 ---
      --- level 4 --- version# 0 ---
      --- level 5 --- version# 0 ---
      --- level 6 --- version# 0 ---
      
      Test Plan: - Tested on an example DB (see output in summary)
      
      Reviewers: sheki, dhruba
      
      Reviewed By: sheki
      
      CC: leveldb, heyongqiang
      
      Differential Revision: https://reviews.facebook.net/D9609
      a8bf8fe5