1. 03 1月, 2013 2 次提交
  2. 28 12月, 2012 2 次提交
  3. 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
  4. 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
  5. 21 12月, 2012 3 次提交
  6. 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
  7. 19 12月, 2012 1 次提交
    • Z
      ldb: add "ldb load" command · be9b862d
      Zheng Shao 提交于
      Summary: This command accepts key-value pairs from stdin with the same format of "ldb dump" command.  This allows us to try out different compression algorithms/block sizes easily.
      
      Test Plan: dump, load, dump, verify the data is the same.
      
      Reviewers: dhruba
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7443
      be9b862d
  8. 18 12月, 2012 4 次提交
  9. 17 12月, 2012 3 次提交
    • Z
      ldb: fix dump command to pad HEX output chars with 0. · 3d9ff0e9
      Zheng Shao 提交于
      Summary: The old code was omitting the 0 if the char is less than 16.
      
      Test Plan:
      Tried the following program:
      int main() {
        unsigned char c = 1;
        printf("%X\n", c);
        printf("%02X\n", c);
        return 0;
      }
      The output is:
      1
      01
      
      Reviewers: dhruba
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7437
      3d9ff0e9
    • Z
      ldb: support --block_size=<4096|65536|...> and --auto_compaction=<0|1> · 7dc8bb71
      Zheng Shao 提交于
      Summary: This allows us to use ldb to do more experiments like block_size changes.
      
      Test Plan: run it by hand.
      
      Reviewers: dhruba, sheki, emayanke
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7431
      7dc8bb71
    • Z
      manifest_dump: Add --hex=1 option · c2809753
      Zheng Shao 提交于
      Summary: Without this option, manifest_dump does not print binary keys for files in a human-readable way.
      
      Test Plan:
      ./manifest_dump --hex=1 --verbose=0 --file=/data/users/zshao/fdb_comparison/leveldb/fbobj.apprequest-0_0_original/MANIFEST-000002
      manifest_file_number 589 next_file_number 590 last_sequence 2311567 log_number 543  prev_log_number 0
      --- level 0 --- version# 0 ---
       532:1300357['0000455BABE20000' @ 2183973 : 1 .. 'FFFCA5D7ADE20000' @ 2184254 : 1]
       536:1308170['000198C75CE30000' @ 2203313 : 1 .. 'FFFCF94A79E30000' @ 2206463 : 1]
       542:1321644['0002931AA5E50000' @ 2267055 : 1 .. 'FFF77B31C5E50000' @ 2270754 : 1]
       544:1286390['000410A309E60000' @ 2278592 : 1 .. 'FFFE470A73E60000' @ 2289221 : 1]
       538:1298778['0006BCF4D8E30000' @ 2217050 : 1 .. 'FFFD77DAF7E30000' @ 2220489 : 1]
       540:1282353['00090D5356E40000' @ 2231156 : 1 .. 'FFFFF4625CE40000' @ 2231969 : 1]
      --- level 1 --- version# 0 ---
       510:2112325['000007F9C2D40000' @ 1782099 : 1 .. '146F5B67B8D80000' @ 1905458 : 1]
       511:2121742['146F8A3023D60000' @ 1824388 : 1 .. '28BC8FBB9CD40000' @ 1777993 : 1]
       512:801631['28BCD396F1DE0000' @ 2080191 : 1 .. '3082DBE9ADDB0000' @ 1989927 : 1]
      
      Reviewers: dhruba, sheki, emayanke
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7425
      c2809753
  10. 15 12月, 2012 1 次提交
    • A
      fixing linters. · 806d4d93
      Abhishek Kona 提交于
      Summary:
      old version of linters use "lint_engine" instead of "lint.engine"
      Some bookeeping in gitignore.
      Reviewers: abhishekk
      806d4d93
  11. 13 12月, 2012 3 次提交
  12. 12 12月, 2012 1 次提交
  13. 11 12月, 2012 3 次提交
  14. 10 12月, 2012 1 次提交
    • D
      Fix a race condition while processing tasks by background threads. · 38671c4d
      Dhruba Borthakur 提交于
      Summary:
      Suppose you submit 100 background tasks one after another. The first
      enqueu task finds that the queue is empty and wakes up one worker thread.
      Now suppose that all remaining 99 work items are enqueued, they do not
      wake up any worker threads because the queue is already non-empty.
      This causes a situation when there are 99 tasks in the task queue but
      only one worker thread is processing a task while the remaining
      worker threads are waiting.
      The fix is to always wakeup one worker thread while enqueuing a task.
      
      I also added a check to count the number of elements in the queue
      to help in debugging.
      
      Test Plan: make clean check.
      
      Reviewers: chip
      
      Reviewed By: chip
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7203
      38671c4d
  15. 08 12月, 2012 4 次提交
    • Z
      ldb: Add compression and bloom filter options. · 768edfaa
      Zheng Shao 提交于
      Summary:
      Added the following two options:
      [--bloom_bits=<int,e.g.:14>]
      [--compression_type=<no|snappy|zlib|bzip2>]
      
      These options will be used when ldb opens the leveldb database.
      
      Test Plan: Tried by hand for both success and failure cases. We do need a test framework.
      
      Reviewers: dhruba, emayanke, sheki
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7197
      768edfaa
    • A
      GetUpdatesSince API to enable replication. · 80550089
      Abhishek Kona 提交于
      Summary:
      How it works:
      * GetUpdatesSince takes a SequenceNumber.
      * A LogFile with the first SequenceNumber nearest and lesser than the requested Sequence Number is found.
      * Seek in the logFile till the requested SeqNumber is found.
      * Return an iterator which contains logic to return record's one by one.
      
      Test Plan:
      * Test case included to check the good code path.
      * Will update with more test-cases.
      * Feedback required on test-cases.
      
      Reviewers: dhruba, emayanke
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7119
      80550089
    • K
      Fixed off by 1 in tests. · f69e9f3e
      Kosie van der Merwe 提交于
      Summary: Added 1 to indices where I shouldn't have so overrun array.
      
      Test Plan: make check
      
      Reviewers: sheki, emayanke, vamsi, dhruba
      
      Reviewed By: dhruba
      
      Differential Revision: https://reviews.facebook.net/D7227
      f69e9f3e
    • K
      Added methods to write small ints to bit streams. · 0eb0c9bb
      Kosie van der Merwe 提交于
      Summary: Added BitStreamPutInt() and BitStreamGetInt() which take a stream of chars and can write integers of arbitrary bit sizes to that stream at arbitrary positions. There are also convenience versions of these functions that take std::strings and leveldb::Slices.
      
      Test Plan: make check
      
      Reviewers: sheki, vamsi, dhruba, emayanke
      
      Reviewed By: vamsi
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D7071
      0eb0c9bb
  16. 05 12月, 2012 1 次提交
  17. 30 11月, 2012 1 次提交
  18. 29 11月, 2012 1 次提交