1. 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
  2. 02 7月, 2013 1 次提交
  3. 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
  4. 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
  5. 18 6月, 2013 1 次提交
  6. 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
  7. 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
  8. 08 6月, 2013 2 次提交
  9. 07 6月, 2013 1 次提交
  10. 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
  11. 10 5月, 2013 1 次提交
  12. 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
  13. 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
  14. 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
  15. 23 4月, 2013 1 次提交
  16. 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
  17. 11 4月, 2013 1 次提交
  18. 09 4月, 2013 1 次提交
  19. 06 4月, 2013 1 次提交
  20. 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
  21. 20 3月, 2013 1 次提交
  22. 09 3月, 2013 2 次提交
  23. 07 3月, 2013 1 次提交
    • A
      Use version 3.8.1 for valgrind in third_party and do away with log files · 3b87e2bd
      amayank 提交于
      Summary:
      valgrind 3.7.0 used currently has a bug that needs LD_PRELOAD being set as a workaround. This caused problems when run on jenkins. 3.8.1 has fixed this issue and we should use it from third party
      Also, have done away with log files. The whole output will be there on the terminal and the failed tests will be listed at the end. This is done because jenkins only lets us download the different files and not view them in the browser which is undesirable.
      
      Test Plan: make valgrind_check
      
      Reviewers: akushner, dhruba, vamsi, sheki, heyongqiang
      
      Reviewed By: sheki
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D9171
      3b87e2bd
  24. 06 3月, 2013 1 次提交
  25. 02 3月, 2013 1 次提交
    • A
      Automating valgrind to run with jenkins · ec96ad54
      amayank 提交于
      Summary:
      The script valgrind_test.sh runs Valgrind for all tests in the makefile
      including leak-checks and outputs the logs for every test in a separate file
      with the name "valgrind_log_<testname>". It prints the failed tests in the file
      "valgrind_failed_tests". All these files are created in the directory
      "VALGRIND_LOGS" which can be changed in the Makefile.
      Finally it checks the line-count for the file "valgrind_failed_tests"
      and returns 0 if no tests failed and 1 otherwise.
      
      Test Plan: ./valgrind_test.sh; Changed the tests to incorporte leaks and verified correctness
      
      Reviewers: dhruba, sheki, MarkCallaghan
      
      Reviewed By: sheki
      
      CC: zshao
      
      Differential Revision: https://reviews.facebook.net/D8877
      ec96ad54
  26. 22 2月, 2013 1 次提交
  27. 19 2月, 2013 2 次提交
    • K
      Fix the "IO error" in auto_roll_logger_test · 45f00304
      Kai Liu 提交于
      Summary:
      
      I missed InitTestDb() in one of my tess. InitTestDb() initializes the test directory, without which the test will throw IO error.
      
      This problem didn't occur before because I've already run the tests before so the test directory is already there.
      
      Test Plan:
      
      Reviewers: dhruba
      
      CC:
      
      Task ID: #
      
      Blame Rev:
      45f00304
    • K
      Temporary remove the auto_roll_logger_test. · ae09544c
      Kai Liu 提交于
      Summary:
      
      auto_roll_logger_test is failing because it cannot create the test dir, leading to IO error: /tmp/leveldbtest-6108/db_log_test/LOG: No such file or directory.
      I'll temporary remove the unit test and will revert the test this problem is solved.
      
      Test Plan:
      
      make all check
      
      Reviewers: dhruba
      
      CC: leveldb
      
      Task ID: #
      
      Blame Rev:
      ae09544c
  28. 05 2月, 2013 1 次提交
    • K
      Allow the logs to be purged by TTL. · b63aafce
      Kai Liu 提交于
      Summary:
      * Add a SplitByTTLLogger to enable this feature. In this diff I implemented generalized AutoSplitLoggerBase class to simplify the
      development of such classes.
      * Refactor the existing AutoSplitLogger and fix several bugs.
      
      Test Plan:
      * Added a unit tests for different types of "auto splitable" loggers individually.
      * Tested the composited logger which allows the log files to be splitted by both TTL and log size.
      
      Reviewers: heyongqiang, dhruba
      
      Reviewed By: heyongqiang
      
      CC: zshao, leveldb
      
      Differential Revision: https://reviews.facebook.net/D8037
      b63aafce
  29. 01 2月, 2013 1 次提交
    • A
      Performant util/histogram. · 009034cf
      Abhishek Kona 提交于
      Summary:
      Earlier way to record in histogram=>
      Linear search BucketLimit array to find the bucket and increment the
      counter
      Current way to record in histogram=>
      Store a HistMap statically which points the buckets of each value in the
      range [kFirstValue, kLastValue);
      
      In the proccess use vectors instead of array's and refactor some code to
      HistogramHelper class.
      
      Test Plan:
      run db_bench with histogram=1 and see a histogram being
      printed.
      
      Reviewers: dhruba, chip, heyongqiang
      
      Reviewed By: chip
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D8265
      009034cf
  30. 29 1月, 2013 1 次提交
  31. 25 1月, 2013 1 次提交
    • C
      Stop continually re-creating build_version.c · 772f75b3
      Chip Turner 提交于
      Summary:
      We continually rebuilt build_version.c because we put the
      current date into it, but that's what __DATE__ already is.  This makes
      builds faster.
      
      This also fixes an issue with 'make clean FOO' not working properly.
      
      Also tweak the build rules to be more consistent, always have warnings,
      and add a 'make release' rule to handle flags for release builds.
      
      Test Plan: make, make clean
      
      Reviewers: dhruba
      
      Reviewed By: dhruba
      
      Differential Revision: https://reviews.facebook.net/D8139
      772f75b3
  32. 15 1月, 2013 1 次提交
    • C
      Various build cleanups/improvements · c0cb289d
      Chip Turner 提交于
      Summary:
      Specific changes:
      
      1) Turn on -Werror so all warnings are errors
      2) Fix some warnings the above now complains about
      3) Add proper dependency support so changing a .h file forces a .c file
      to rebuild
      4) Automatically use fbcode gcc on any internal machine rather than
      whatever system compiler is laying around
      5) Fix jemalloc to once again be used in the builds (seemed like it
      wasn't being?)
      6) Fix issue where 'git' would fail in build_detect_version because of
      LD_LIBRARY_PATH being set in the third-party build system
      
      Test Plan:
      make, make check, make clean, touch a header file, make sure
      rebuild is expected
      
      Reviewers: dhruba
      
      Reviewed By: dhruba
      
      Differential Revision: https://reviews.facebook.net/D7887
      c0cb289d
  33. 22 12月, 2012 2 次提交
  34. 21 12月, 2012 1 次提交
  35. 07 11月, 2012 1 次提交
  36. 06 11月, 2012 1 次提交