1. 18 1月, 2013 2 次提交
    • A
      Add counters to count gets and writes · 16903c35
      Abhishek Kona 提交于
      Summary: Add Tickers to count Write's and Get's
      
      Test Plan: make check
      
      Reviewers: dhruba, chip
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7977
      16903c35
    • K
      Fixed issues Valgrind found. · 3c3df740
      Kosie van der Merwe 提交于
      Summary:
      Found issues with `db_test` and `db_stress` when running valgrind.
      
      `DBImpl` had an issue where if an compaction failed then it will use the uninitialised file size of an output file is used. This manifested as the final call to output to the log in `DoCompactionWork()` branching on uninitialized memory (all the way down in printf's innards).
      
      Test Plan:
      Ran `valgrind --track_origins=yes ./db_test` and `valgrind ./db_stress` to see if issues disappeared.
      
      Ran `make check` to see if there were no regressions.
      
      Reviewers: vamsi, dhruba
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D8001
      3c3df740
  2. 17 1月, 2013 4 次提交
  3. 16 1月, 2013 5 次提交
  4. 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
  5. 12 1月, 2013 1 次提交
  6. 11 1月, 2013 2 次提交
  7. 10 1月, 2013 3 次提交
    • K
      Fixed wrong assumption in Table::Open() · 4e9d9d98
      Kosie van der Merwe 提交于
      Summary:
      `Table::Open()` assumes that `size` correctly describes the size of `file`, added a check that the footer is actually the right size and for good measure added assertions to `Footer::DecodeFrom()`.
      
      This was discovered by running `valgrind ./db_test` and seeing that `Footer::DecodeFrom()` was accessing uninitialized memory.
      
      Test Plan:
      make clean check
      
      ran `valgrind ./db_test` and saw DBTest.NoSpace no longer complains about a conditional jump being dependent on uninitialized memory.
      
      Reviewers: dhruba, vamsi, emayanke, sheki
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7815
      4e9d9d98
    • D
      Release 1.5.7.fb · f881d6f2
      Dhruba Borthakur 提交于
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      CC:
      
      Task ID: #
      
      Blame Rev:
      f881d6f2
    • A
      Remove unnecessary asserts in table/merger.cc · 2e1ad2c4
      Abhishek Kona 提交于
      Summary:
      The asserts introduced in https://reviews.facebook.net/D7629 are
      wrong.
      
      The direction of iteration is changed after the function call so they
      assert's fail.
      
      Test Plan: make clean check
      
      Reviewers: dhruba
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7827
      2e1ad2c4
  8. 09 1月, 2013 3 次提交
  9. 08 1月, 2013 2 次提交
    • K
      Added clearer error message for failure to create db directory in DBImpl::Recover() · d6e873f2
      Kosie van der Merwe 提交于
      Summary:
      Changed CreateDir() to CreateDirIfMissing() so a directory that already exists now causes and error.
      
      Fixed CreateDirIfMissing() and added Env.DirExists()
      
      Test Plan:
      make check to test for regessions
      
      Ran the following to test if the error message is not about lock files not existing
      ./db_bench --db=dir/testdb
      
      After creating a file "testdb", ran the following to see if it failed with sane error message:
      ./db_bench --db=testdb
      
      Reviewers: dhruba, emayanke, vamsi, sheki
      
      Reviewed By: emayanke
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7707
      d6e873f2
    • M
      Add --seed, --read_range to db_bench · 4069f66c
      Mark Callaghan 提交于
      Summary:
      Adds the option --seed to db_bench to specify the base for the per-thread RNG.
      When not set each thread uses the same value across runs of db_bench which defeats
      IO stress testing.
      
      Adds the option --read_range. When set to a value > 1 an iterator is created and
      each query done for the randomread benchmark will do a range scan for that many
      rows. When not set or set to 1 the existing behavior (a point lookup) is done.
      
      Fixes a bug where a printf format string was missing.
      
      Test Plan: run db_bench
      
      Reviewers: dhruba
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7749
      4069f66c
  10. 04 1月, 2013 1 次提交
    • K
      Fixing and adding some comments · 8cd86a7b
      Kosie van der Merwe 提交于
      Summary:
      `MemTableList::Add()` neglected to mention that it took ownership of the reference held by its caller.
      
      The comment in `MemTable::Get()` was wrong in describing the format of the key.
      
      Test Plan: None
      
      Reviewers: dhruba, sheki, emayanke, vamsi
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7755
      8cd86a7b
  11. 03 1月, 2013 2 次提交
  12. 28 12月, 2012 2 次提交
  13. 27 12月, 2012 3 次提交
    • Z
      ldb: Add command "ldb query" to support random read from the database · 0f762ac5
      Zheng Shao 提交于
      Summary: The queries will come from stdin.  One key per line.  The output will be in stdout, in the format of "<key> ==> <value>" if found, or "<key>" if not found.  "--hex" uses HEX-encoded keys and values in both input and output.
      
      Test Plan: ldb query --db=leveldb_db --hex
      
      Reviewers: dhruba, emayanke, sheki
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7617
      0f762ac5
    • Z
      ldb: Fix incorrect arg parsing · dcece470
      Zheng Shao 提交于
      Summary: We were ignoring additional chars at the end of an arg.  This can create confusion, e.g. --disable_wal=0 will act the same as --disable_wal without any warnings.
      
      Test Plan:
      Tried this:
      [zshao@dev485 ~/git/rocksdb] ./ldb dump --statsAAA
      Failed: Unknown argument:--statsAAA
      
      Reviewers: dhruba, sheki, emayanke
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7635
      dcece470
    • Z
      sst_dump: Fix incorrect cmd args parsing · 04832dbc
      Zheng Shao 提交于
      Summary: The current parsing logic ignores any additional chars after the arg.
      
      Test Plan: "./sst_dump --verify_checksumAAA" now outputs error.
      
      Reviewers: dhruba, sheki, emayanke
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7611
      04832dbc
  14. 22 12月, 2012 5 次提交
    • A
      Create a long running test to check GetUpdatesSince. · 396c3aa0
      Abhishek Kona 提交于
      Summary:
      Create an Executable with
      * A thread to do Put's
      * A thread to use GetUpdatesSince. Check if we miss any sequence
        Numbers.
      
      Test Plan: It runs.
      
      Reviewers: dhruba
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7383
      396c3aa0
    • Z
      manifest_dump: Fix the help message and make it consistent · 127ee2e6
      Zheng Shao 提交于
      Summary: ldb uses --output_hex so make manifest_dump do the same thing.
      
      Test Plan:
      [zshao@dev485 ~/git/rocksdb] ./manifest_dump --output_hex --file=/data/users/zshao/test_leveldb/MANIFEST-000034
      manifest_file_number 42 next_file_number 43 last_sequence 2311567 log_number 36  prev_log_number 0
      --- level 0 --- version# 0 ---
      --- level 1 --- version# 0 ---
      --- level 2 --- version# 0 ---
      --- level 3 --- version# 0 ---
       5:27788699['0000027F4FBE0000' @ 1 : 1 .. '11CE749602C90000' @ 160642 : 1]
       7:27785313['11CE773DA7E00000' @ 160643 : 1 .. '23A4C63EC55D0000' @ 321094 : 1]
       9:27784288['23A4D581FCD30000' @ 321095 : 1 .. '3576291D12D00000' @ 481428 : 1]
       38:64378271['35762BF0E0CE0000' @ 481429 : 1 .. '5E987E0604700000' @ 852910 : 1]
       39:64379046['5E987EB0BDD50000' @ 852911 : 1 .. '87C954330E840000' @ 1224603 : 1]
       40:10169201['87C95507E49C0000' @ 1224604 : 1 .. '8E48DC0933B70000' @ 1283317 : 1]
       21:27798825['8E48DFB0D7CE0000' @ 1283318 : 1 .. 'A00675F8AD7E0000' @ 1443826 : 1]
       23:27793751['A006777536E30000' @ 1443827 : 1 .. 'B1D1787FE8670000' @ 1604553 : 1]
       25:27801659['B1D179289BB30000' @ 1604554 : 1 .. 'C396D3A69DCE0000' @ 1765012 : 1]
       27:27792661['C396DA1E03B10000' @ 1765013 : 1 .. 'D55C9974FCC10000' @ 1925513 : 1]
       29:27789095['D55C9B47CBC00000' @ 1925514 : 1 .. 'E71F67D11CCC0000' @ 2085789 : 1]
       31:27793145['E71F7A667E740000' @ 2085790 : 1 .. 'F8D4712EF3D90000' @ 2246454 : 1]
       41:11246031['F8D4715916A70000' @ 2246455 : 1 .. 'FFFFFCAE97DF0000' @ 2311567 : 1]
      --- level 4 --- version# 0 ---
      --- level 5 --- version# 0 ---
      --- level 6 --- version# 0 ---
      
      Reviewers: dhruba, sheki, emayanke
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7575
      127ee2e6
    • Z
      sst_dump: Add --output_hex option and output the same format as ldb dump · 01d57a33
      Zheng Shao 提交于
      Summary: Now sst_dump has the same option --output_hex as "ldb dump" and also share the same output format.  So we can do "sst_dump ... | ldb load ..." for an experiment.
      
      Test Plan:
      [zshao@dev485 ~/git/rocksdb] ./sst_dump --file=/data/users/zshao/test_leveldb/000005.sst  --output_hex | head -n 2
      0000027F4FBE00000101000000000000 ==> D901000000000000000057596F7520726563656976656420746F6461792773207370656369616C20676966742120436C69636B2041636365707420746F207669657720796F75722047696674206265666F72652069742064697361707065617273210000000000000000
      000007F9C2D400000102000000000000 ==> D1010000000000000000544974277320676F6F6420746F206265204B696E67E280A6206F7220517565656E212048657265277320796F75722054756573646179204D79737465727920476966742066726F6D20436173746C6556696C6C65219B7B227A636F6465223A22633566306531633039663764222C227470223A22613275222C227A6B223A22663638663061343262666264303966383435666239626235366365396536643024246234506C345139382E734C4D33522169482D4F31315A64794C4B7A4F4653766D7863746534625F2A3968684E3433786521776C427636504A414355795F70222C227473223A313334343936313737357D0000000000000000
      
      Reviewers: dhruba, sheki, emayanke
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7587
      01d57a33
    • Z
      ldb: file_size and write_buffer_size options. · 70f0f507
      Zheng Shao 提交于
      Summary:
      This allows ldb to control the write_buffer_size (which reflects to L0 file size) and file_size (which reflects to L1 file size).  Since the target_file_size_ratio is 1 by default, all other levels will also have the same file size as L1.
      
      As part of the diff, I also cleaned up some unused code and help messages.
      
      Test Plan: ./ldb load --db=/data/users/zshao/test_leveldb --file_size=64000000 --write_buffer_size=32000000 --create_if_missing --input_hex --disable_wal
      
      Reviewers: dhruba, sheki, emayanke
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7569
      70f0f507
    • A
      Use CRC32 ss42 instruction. Load it dynamically. · 1aae609b
      Abhishek Kona 提交于
      Test Plan: make all check
      
      Reviewers: dhruba
      
      Reviewed By: dhruba
      
      CC: leveldb, zshao
      
      Differential Revision: https://reviews.facebook.net/D7503
      1aae609b
  15. 21 12月, 2012 3 次提交
  16. 20 12月, 2012 1 次提交
    • D
      Enhance ReadOnly mode to process the all committed transactions. · f4c2b7cf
      Dhruba Borthakur 提交于
      Summary:
      Leveldb has an api OpenForReadOnly() that opens the database
      in readonly mode. This call had an option to not process the
      transaction log.  This patch removes this option and always
      processes all transactions that had been committed. It has
      been done in such a way that it does not create/write to
      any new files in the process. The invariant of "no-writes"
      to the leveldb data directory is still true.
      
      This enhancement allows multiple threads to open the same database
      in readonly mode and access all trancations that were committed right
      upto the OpenForReadOnly call.
      
      I changed the public API to match the new semantics because
      there are no users who are currently using this api.
      
      Test Plan: make clean check
      
      Reviewers: sheki
      
      Reviewed By: sheki
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7479
      f4c2b7cf