1. 20 4月, 2016 1 次提交
  2. 31 3月, 2016 1 次提交
    • L
      to/from hex refactor · 21700a51
      Laurent Demailly 提交于
      Summary:
      Expose the inverse of ToString(hex=true) on Slice: Slice::DecodeHex
      Refactor the other implementation of to/from hex in ldb_cmd.h to use the Slice
      version
      (Difference between the 2 is whether 0x is expected/produced in front of the hex
      string or not)
      Eliminated support for invalid odd length hex string - this is now invalid
      instead of having 1/2 byte set
      Added (inverse of HexToString) test for LDBCommand::StringToHex which also
      indirectly tests Slice::ToString(true)
      
      After moving the original implementation from ldb_cmd.h, updated it to much simpler/efficient version
      (originally/inspired from https://github.com/facebook/wdt/blob/master/util/EncryptionUtils.cpp#L140-L169 )
      
      Test Plan: run tests
      
      Reviewers: uddipta, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D56121
      21700a51
  3. 10 2月, 2016 1 次提交
  4. 29 8月, 2015 1 次提交
    • S
      Add ZSTD (not final format) compression type · 7a0dbdf3
      sdong 提交于
      Summary: Add ZSTD compression type. The same way as adding LZ4.
      
      Test Plan: run all tests. Generate files in db_bench. Make sure reads succeed. But the SST files cannot be opened in older versions. Also some other adhoc tests.
      
      Reviewers: rven, anthony, IslamAbdelRahman, kradhakrishnan, igor
      
      Reviewed By: igor
      
      Subscribers: MarkCallaghan, maykov, yoshinorim, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D45747
      7a0dbdf3
  5. 18 7月, 2015 1 次提交
    • S
      Move rate_limiter, write buffering, most perf context instrumentation and most... · 6e9fbeb2
      sdong 提交于
      Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env
      
      Summary: We want to keep Env a think layer for better portability. Less platform dependent codes should be moved out of Env. In this patch, I create a wrapper of file readers and writers, and put rate limiting, write buffering, as well as most perf context instrumentation and random kill out of Env. It will make it easier to maintain multiple Env in the future.
      
      Test Plan: Run all existing unit tests.
      
      Reviewers: anthony, kradhakrishnan, IslamAbdelRahman, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D42321
      6e9fbeb2
  6. 24 4月, 2015 1 次提交
    • S
      Build for CYGWIN · 98a44559
      sdong 提交于
      Summary:
      Make it build for CYGWIN.
      Need to define "-std=gnu++11" instead of "-std=c++11" and use some replacement functions.
      
      Test Plan: Build it and run some unit tests in CYGWIN
      
      Reviewers: yhchiang, rven, anthony, kradhakrishnan, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D37605
      98a44559
  7. 15 1月, 2015 1 次提交
    • I
      New BlockBasedTable version -- better compressed block format · 9ab5adfc
      Igor Canadi 提交于
      Summary:
      This diff adds BlockBasedTable format_version = 2. New format version brings better compressed block format for these compressions:
      1) Zlib -- encode decompressed size in compressed block header
      2) BZip2 -- encode decompressed size in compressed block header
      3) LZ4 and LZ4HC -- instead of doing memcpy of size_t encode size as varint32. memcpy is very bad because the DB is not portable accross big/little endian machines or even platforms where size_t might be 8 or 4 bytes.
      
      It does not affect format for snappy.
      
      If you write a new database with format_version = 2, it will not be readable by RocksDB versions before 3.10. DB::Open() will return corruption in that case.
      
      Test Plan:
      Added a new test in db_test.
      I will also run db_bench and verify VSIZE when block_cache == 1GB
      
      Reviewers: yhchiang, rven, MarkCallaghan, dhruba, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D31461
      9ab5adfc
  8. 14 1月, 2015 1 次提交
  9. 10 1月, 2015 1 次提交
  10. 24 12月, 2014 1 次提交
  11. 14 11月, 2014 1 次提交
  12. 12 11月, 2014 1 次提交
    • I
      Turn on -Wshorten-64-to-32 and fix all the errors · 767777c2
      Igor Canadi 提交于
      Summary:
      We need to turn on -Wshorten-64-to-32 for mobile. See D1671432 (internal phabricator) for details.
      
      This diff turns on the warning flag and fixes all the errors. There were also some interesting errors that I might call bugs, especially in plain table. Going forward, I think it makes sense to have this flag turned on and be very very careful when converting 64-bit to 32-bit variables.
      
      Test Plan: compiles
      
      Reviewers: ljin, rven, yhchiang, sdong
      
      Reviewed By: yhchiang
      
      Subscribers: bobbaldwin, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D28689
      767777c2
  13. 07 11月, 2014 1 次提交
    • I
      Turn -Wshadow back on · 9f20395c
      Igor Canadi 提交于
      Summary: It turns out that -Wshadow has different rules for gcc than clang. Previous commit fixed clang. This commits fixes the rest of the warnings for gcc.
      
      Test Plan: compiles
      
      Reviewers: ljin, yhchiang, rven, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D28131
      9f20395c
  14. 01 10月, 2014 1 次提交
  15. 18 9月, 2014 2 次提交
  16. 11 9月, 2014 1 次提交
    • I
      [unit test] CompactRange should fail if we don't have space · 059e584d
      Igor Canadi 提交于
      Summary:
      See t5106397.
      
      Also, few more changes:
      1. in unit tests, the assumption is that writes will be dropped when there is no space left on device. I changed the wording around it.
      2. InvalidArgument() errors are only when user-provided arguments are invalid. When the file is corrupted, we need to return Status::Corruption
      
      Test Plan: make check
      
      Reviewers: sdong, ljin
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D23145
      059e584d
  17. 03 9月, 2014 1 次提交
    • T
      Refactor PerfStepTimer to stop on destruct · 6614a484
      Torrie Fischer 提交于
      This eliminates the need to remember to call PERF_TIMER_STOP when a section has
      been timed. This allows more useful design with the perf timers and enables
      possible return value optimizations. Simplistic example:
      
      class Foo {
        public:
          Foo(int v) : m_v(v);
        private:
          int m_v;
      }
      
      Foo makeFrobbedFoo(int *errno)
      {
        *errno = 0;
        return Foo();
      }
      
      Foo bar(int *errno)
      {
        PERF_TIMER_GUARD(some_timer);
      
        return makeFrobbedFoo(errno);
      }
      
      int main(int argc, char[] argv)
      {
        Foo f;
        int errno;
      
        f = bar(&errno);
      
        if (errno)
          return -1;
        return 0;
      }
      
      After bar() is called, perf_context.some_timer would be incremented as if
      Stop(&perf_context.some_timer) was called at the end, and the compiler is still
      able to produce optimizations on the return value from makeFrobbedFoo() through
      to main().
      6614a484
  18. 05 8月, 2014 1 次提交
  19. 31 7月, 2014 1 次提交
  20. 08 5月, 2014 1 次提交
  21. 02 5月, 2014 3 次提交
  22. 09 4月, 2014 1 次提交
  23. 09 2月, 2014 1 次提交
  24. 08 2月, 2014 3 次提交
    • K
      Fix incompatible compilation in Linux server · b8ea5e36
      Kai Liu 提交于
      b8ea5e36
    • K
      Make table properties shareable · 161ab42a
      kailiu 提交于
      Summary:
      We are going to expose properties of all tables to end users through "some" db interface.
      However, current design doesn't naturally fit for this need, which is because:
      
      1. If a table presents in table cache, we cannot simply return the reference to its table properties, because the table may be destroy after compaction (and we don't want to hold the ref of the version).
      2. Copy table properties is OK, but it's slow.
      
      Thus in this diff, I change the table reader's interface to return a shared pointer (for const table properties), instead a const refernce.
      
      Test Plan: `make check` passed
      
      Reviewers: haobo, sdong, dhruba
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D15999
      161ab42a
    • Y
      Add support for plain table format to sst_dump. · 3ce8d9a9
      Yueh-Hsuan Chiang 提交于
      Summary:
      This diff enables the command line tool `sst_dump` to work for sst files
      under plain table format.  Changes include:
        * In tools/sst_dump.cc:
          - add support for plain table format
          - display prefix_extractor information when --show_properties is on
        * In table/format.cc
          - Now the table magic number of a Footer can be later initialized
            via ReadFooterFromFile().
        * In table/meta_bocks:
          - add function ReadTableMagicNumber() that reads the magic number of
            the specified file.
      
      Minor fixes:
       - remove a duplicate #include in table/table_test.cc
       - fix a commentary typo in include/rocksdb/memtablerep.h
       - fix lint errors.
      
      Test Plan:
      Runs sst_dump with both block-based and plain-table format files with
      different arguments, specifically those with --show-properties and --from.
      
      * sample output:
        https://reviews.facebook.net/P261
      
      Reviewers: kailiu, sdong, xjin
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D15903
      3ce8d9a9
  25. 05 12月, 2013 2 次提交
  26. 07 11月, 2013 1 次提交
    • D
      Fix stress test failure when using mmap-reads. · 292c2b33
      Dhruba Borthakur 提交于
      Summary:
      The mmap-read file->Read() does not use the scratch buffer to
      read in file-contents.
      
      Test Plan: ./db_stress --test_batches_snapshots=1 --ops_per_thread=100000000 --threads=32 --write_buffer_size=4194304 --destroy_db_initially=0 --reopen=0 --readpercent=45 --prefixpercent=5 --writepercent=35 --delpercent=5 --iterpercent=10 --db=/tmp/dhruba --max_key=100000000 --disable_seek_compaction=0 --mmap_read=1 --block_size=16384 --cache_size=1048576 --open_files=500000 --verify_checksum=1 --sync=1 --disable_wal=0 --disable_data_sync=0 --target_file_size_base=2097152 --target_file_size_multiplier=2 --max_write_buffer_number=3 --max_background_compactions=20 --max_bytes_for_level_base=10485760 --filter_deletes=0
      
      Reviewers: haobo, kailiu
      
      Reviewed By: kailiu
      
      CC: leveldb, kailiu, emayanke
      
      Differential Revision: https://reviews.facebook.net/D13923
      292c2b33
  27. 02 11月, 2013 1 次提交
    • D
      Implement a compressed block cache. · b4ad5e89
      Dhruba Borthakur 提交于
      Summary:
      Rocksdb can now support a uncompressed block cache, or a compressed
      block cache or both. Lookups first look for a block in the
      uncompressed cache, if it is not found only then it is looked up
      in the compressed cache. If it is found in the compressed cache,
      then it is uncompressed and inserted into the uncompressed cache.
      
      It is possible that the same block resides in the compressed cache
      as well as the uncompressed cache at the same time. Both caches
      have their own individual LRU policy.
      
      Test Plan: Unit test case attached.
      
      Reviewers: kailiu, sdong, haobo, leveldb
      
      Reviewed By: haobo
      
      CC: xjin, haobo
      
      Differential Revision: https://reviews.facebook.net/D12675
      b4ad5e89
  28. 17 10月, 2013 1 次提交
  29. 05 10月, 2013 1 次提交
  30. 08 9月, 2013 1 次提交
    • H
      [RocksDB] Added nano second stopwatch and new perf counters to track block read cost · f2f4c807
      Haobo Xu 提交于
      Summary: The pupose of this diff is to expose per user-call level precise timing of block read, so that we can answer questions like: a Get() costs me 100ms, is that somehow related to loading blocks from file system, or sth else? We will answer that with EXACTLY how many blocks have been read, how much time was spent on transfering the bytes from os, how much time was spent on checksum verification and how much time was spent on block decompression, just for that one Get. A nano second stopwatch was introduced to track time with higher precision. The cost/precision of the stopwatch is also measured in unit-test. On my dev box, retrieving one time instance costs about 30ns, on average. The deviation of timing results is good enough to track 100ns-1us level events. And the overhead could be safely ignored for 100us level events (10000 instances/s), for example, a viewstate thrift call.
      
      Test Plan: perf_context_test, also testing with viewstate shadow traffic.
      
      Reviewers: dhruba
      
      Reviewed By: dhruba
      
      CC: leveldb, xjin
      
      Differential Revision: https://reviews.facebook.net/D12351
      f2f4c807
  31. 24 8月, 2013 1 次提交
  32. 30 4月, 2013 1 次提交
  33. 01 3月, 2013 1 次提交
  34. 10 1月, 2013 1 次提交
    • 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