1. 11 5月, 2014 1 次提交
  2. 10 5月, 2014 2 次提交
  3. 08 5月, 2014 4 次提交
    • D
      remove anon mmap allocation flag `MAP_HUGETLB` · f41cde31
      dallas marlow 提交于
      f41cde31
    • I
      Fix iOS compile · b5616daf
      Igor Canadi 提交于
      b5616daf
    • I
      [fix] SIGSEGV when VersionEdit in MANIFEST is corrupted · 768d424d
      Igor Canadi 提交于
      Summary:
      This was reported by our customers in task #4295529.
      
      Cause:
      * MANIFEST file contains a VersionEdit, which contains file entries whose 'smallest' and 'largest' internal keys are empty. String with zero characters. Root cause of corruption was not investigated. We should report corruption when this happens. However, we currently SIGSEGV.
      
      Here's what happens:
      * VersionEdit encodes zero-strings happily and stores them in smallest and largest InternalKeys. InternalKey::Encode() does assert when `rep_.empty()`, but we don't assert in production environemnts. Also, we should never assert as a result of DB corruption.
      * As part of our ConsistencyCheck, we call GetLiveFilesMetaData()
      * GetLiveFilesMetadata() calls `file->largest.user_key().ToString()`
      * user_key() function does: 1. assert(size > 8) (ooops, no assert), 2. returns `Slice(internal_key.data(), internal_key.size() - 8)`
      * since `internal_key.size()` is unsigned int, this call translates to `Slice(whatever, 1298471928561892576182756)`. Bazinga.
      
      Fix:
      * VersionEdit checks if InternalKey is valid in `VersionEdit::GetInternalKey()`. If it's invalid, returns corruption.
      
      Lessons learned:
      * Always keep in mind that even if you `assert()`, production code will continue execution even if assert fails.
      * Never `assert` based on DB corruption. Assert only if the code should guarantee that assert can't fail.
      
      Test Plan: dumped offending manifest. Before: assert. Now: corruption
      
      Reviewers: dhruba, haobo, sdong
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D18507
      768d424d
    • I
      Better INSTALL.md and Makefile rules · 313b2e5d
      Igor Canadi 提交于
      Summary: We have a lot of problems with gflags. However, when compiling rocksdb static library, we don't need gflags dependency. Reorganize INSTALL.md such that first-time customers don't need any dependency installed to actually build rocksdb static library.
      
      Test Plan: none
      
      Reviewers: dhruba, haobo
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D18501
      313b2e5d
  4. 07 5月, 2014 1 次提交
    • S
      fsync directory after creating current file in NewDB() · 9efbd85a
      sdong 提交于
      Summary: One of our users reported current file corruption. The machine was rebooted during the time. This is the only think I can think of which could cause current file corruption. Just add this paranoid check.
      
      Test Plan: make all check
      
      Reviewers: haobo, igor
      
      Reviewed By: haobo
      
      CC: yhchiang, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D18495
      9efbd85a
  5. 06 5月, 2014 7 次提交
  6. 05 5月, 2014 4 次提交
  7. 04 5月, 2014 1 次提交
  8. 03 5月, 2014 4 次提交
  9. 02 5月, 2014 5 次提交
    • I
      Improve ttl_test · 3b5fa6bd
      Igor Canadi 提交于
      Summary:
      Our valgrind tests are failing because ttl_test is kind of flakey. This diff should fix valgrind issue and make ttl_test less flakey and much faster.
      
      Instead of relying on Env::Default() for getting current time, I expose `Env*` to all TTL functions that are interested in time. That way, I can insert a custom test Env which is then used to provide exactly the times we need. That way, we don't need to sleep anymore -- we control the time.
      
      Test Plan: ttl_test in normal and valgrind run
      
      Reviewers: dhruba, haobo, sdong, yhchiang
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D18399
      3b5fa6bd
    • I
      Include version in options · 82042f45
      Igor Canadi 提交于
      82042f45
    • I
      fix release build · d28ed693
      Igor Canadi 提交于
      d28ed693
    • I
      fix compile warning · d29e48bb
      Igor Canadi 提交于
      d29e48bb
    • I
      xxHash · 0afc8bc2
      Igor Canadi 提交于
      Summary:
      Originally: https://github.com/facebook/rocksdb/pull/87/files
      
      I'm taking over to apply some finishing touches
      
      Test Plan: will add tests
      
      Reviewers: dhruba, haobo, sdong, yhchiang, ljin
      
      Reviewed By: yhchiang
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D18315
      0afc8bc2
  10. 01 5月, 2014 7 次提交
  11. 30 4月, 2014 4 次提交
    • I
      More s/us fixes · d6d67c0e
      Igor Canadi 提交于
      d6d67c0e
    • Y
      Merge pull request #131 from ankgup87/master · 2e11e47c
      Yueh-Hsuan Chiang 提交于
      [Java] Add multiget JNI bindings
      2e11e47c
    • I
      Merge pull request #132 from kjk/master · 046a85af
      Igor Canadi 提交于
      Improve building of shared library so that it e.g. works with Go bindings
      046a85af
    • Y
      Add a new mem-table representation based on cuckoo hash. · 9d9d2965
      Yueh-Hsuan Chiang 提交于
      Summary:
      = Major Changes =
      * Add a new mem-table representation, HashCuckooRep, which is based cuckoo hash.
        Cuckoo hash uses multiple hash functions.  This allows each key to have multiple
        possible locations in the mem-table.
      
        - Put: When insert a key, it will try to find whether one of its possible
          locations is vacant and store the key.  If none of its possible
          locations are available, then it will kick out a victim key and
          store at that location.  The kicked-out victim key will then be
          stored at a vacant space of its possible locations or kick-out
          another victim.  In this diff, the kick-out path (known as
          cuckoo-path) is found using BFS, which guarantees to be the shortest.
      
       - Get: Simply tries all possible locations of a key --- this guarantees
         worst-case constant time complexity.
      
       - Time complexity: O(1) for Get, and average O(1) for Put if the
         fullness of the mem-table is below 80%.
      
       - Default using two hash functions, the number of hash functions used
         by the cuckoo-hash may dynamically increase if it fails to find a
         short-enough kick-out path.
      
       - Currently, HashCuckooRep does not support iteration and snapshots,
         as our current main purpose of this is to optimize point access.
      
      = Minor Changes =
      * Add IsSnapshotSupported() to DB to indicate whether the current DB
        supports snapshots.  If it returns false, then DB::GetSnapshot() will
        always return nullptr.
      
      Test Plan:
      Run existing tests.  Will develop a test specifically for cuckoo hash in
      the next diff.
      
      Reviewers: sdong, haobo
      
      Reviewed By: sdong
      
      CC: leveldb, dhruba, igor
      
      Differential Revision: https://reviews.facebook.net/D16155
      9d9d2965