1. 04 6月, 2014 1 次提交
  2. 03 6月, 2014 1 次提交
    • S
      In DB::NewIterator(), try to allocate the whole iterator tree in an arena · df9069d2
      sdong 提交于
      Summary:
      In this patch, try to allocate the whole iterator tree starting from DBIter from an arena
      1. ArenaWrappedDBIter is created when serves as the entry point of an iterator tree, with an arena in it.
      2. Add an option to create iterator from arena for following iterators: DBIter, MergingIterator, MemtableIterator, all mem table's iterators, all table reader's iterators and two level iterator.
      3. MergeIteratorBuilder is created to incrementally build the tree of internal iterators. It is passed to mem table list and version set and add iterators to it.
      
      Limitations:
      (1) Only DB::NewIterator() without tailing uses the arena. Other cases, including readonly DB and compactions are still from malloc
      (2) Two level iterator itself is allocated in arena, but not iterators inside it.
      
      Test Plan: make all check
      
      Reviewers: ljin, haobo
      
      Reviewed By: haobo
      
      Subscribers: leveldb, dhruba, yhchiang, igor
      
      Differential Revision: https://reviews.facebook.net/D18513
      df9069d2
  3. 31 5月, 2014 1 次提交
    • L
      forward iterator · 388d2054
      Lei Jin 提交于
      Summary:
      Forward iterator puts everything together in a flat structure instead of
      a hierarchy of nested iterators. this should simplify the code and
      provide better performance. It also enables more optimization since all
      information are accessiable in one place.
      Init evaluation shows about 6% improvement
      
      Test Plan: db_test and db_bench
      
      Reviewers: dhruba, igor, tnovak, sdong, haobo
      
      Reviewed By: haobo
      
      Subscribers: sdong, leveldb
      
      Differential Revision: https://reviews.facebook.net/D18795
      388d2054
  4. 10 5月, 2014 1 次提交
  5. 15 4月, 2014 1 次提交
  6. 09 4月, 2014 1 次提交
  7. 08 4月, 2014 1 次提交
    • S
      PlainTableIterator not to store copied key in std::string · 5e2db3b4
      sdong 提交于
      Summary:
      Move PlainTableIterator's copied key from std::string local buffer to avoid paying the extra costs in std::string related to sharing. Reuse the same buffer class in DbIter. Move the class to dbformat.h.
      
      This patch improves iterator performance significantly. Running this benchmark:
      
      ./table_reader_bench --num_keys2=17 --iterator --plain_table --time_unit=nanosecond
      
      The average latency is improved to about 750 nanoseconds from 1100 nanoseconds.
      
      Test Plan:
      Add a unit test.
      make all check
      
      Reviewers: haobo, ljin
      
      Reviewed By: haobo
      
      CC: igor, yhchiang, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D17547
      5e2db3b4
  8. 02 4月, 2014 1 次提交
  9. 25 3月, 2014 1 次提交
    • Y
      Enhance partial merge to support multiple arguments · cda4006e
      Yueh-Hsuan Chiang 提交于
      Summary:
      * PartialMerge api now takes a list of operands instead of two operands.
      * Add min_pertial_merge_operands to Options, indicating the minimum
        number of operands to trigger partial merge.
      * This diff is based on Schalk's previous diff (D14601), but it also
        includes necessary changes such as updating the pure C api for
        partial merge.
      
      Test Plan:
      * make check all
      * develop tests for cases where partial merge takes more than two
        operands.
      
      TODOs (from Schalk):
      * Add test with min_partial_merge_operands > 2.
      * Perform benchmarks to measure the performance improvements (can probably
        use results of task #2837810.)
      * Add description of problem to doc/index.html.
      * Change wiki pages to reflect the interface changes.
      
      Reviewers: haobo, igor, vamsi
      
      Reviewed By: haobo
      
      CC: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D16815
      cda4006e
  10. 18 3月, 2014 1 次提交
    • S
      Fix a bug that Prev() can hang. · c61c9830
      sdong 提交于
      Summary: Prev() now can hang when there is a key with more than max_skipped number of appearance internally but all of them are newer than the sequence ID to seek. Add unit tests to confirm the bug and fix it.
      
      Test Plan: make all check
      
      Reviewers: igor, haobo
      
      Reviewed By: igor
      
      CC: ljin, yhchiang, leveldb
      
      Differential Revision: https://reviews.facebook.net/D16899
      c61c9830
  11. 04 2月, 2014 1 次提交
  12. 09 1月, 2014 1 次提交
    • I
      Add column family information to WAL · 19e3ee64
      Igor Canadi 提交于
      Summary:
      I have added three new value types:
      * kTypeColumnFamilyDeletion
      * kTypeColumnFamilyValue
      * kTypeColumnFamilyMerge
      which include column family Varint32 before the data (value, deletion and merge). These values are used only in WAL (not in memtables yet).
      
      This endeavour required changing some WriteBatch internals.
      
      Test Plan: Added a unittest
      
      Reviewers: dhruba, haobo, sdong, kailiu
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D15045
      19e3ee64
  13. 04 12月, 2013 1 次提交
    • I
      Get rid of some shared_ptrs · 043fc14c
      Igor Canadi 提交于
      Summary:
      I went through all remaining shared_ptrs and removed the ones that I found not-necessary. Only GenerateCachePrefix() is called fairly often, so don't expect much perf wins.
      
      The ones that are left are accessed infrequently and I think we're fine with keeping them.
      
      Test Plan: make asan_check
      
      Reviewers: dhruba, haobo
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D14427
      043fc14c
  14. 26 11月, 2013 1 次提交
  15. 22 11月, 2013 3 次提交
  16. 21 11月, 2013 1 次提交
  17. 18 10月, 2013 1 次提交
    • S
      Fix Bug: iterator.Prev() or iterator.SeekToLast() might return the first... · 65428b0c
      Siying Dong 提交于
      Fix Bug: iterator.Prev() or iterator.SeekToLast() might return the first element instead of the correct one
      
      Summary:
      Recent patch https://reviews.facebook.net/D11865 introduced a regression bug:
      
      DBIter::FindPrevUserEntry(), which is called by DBIter::Prev() (and also implicitly if calling iterator.SeekToLast())  might do issue a seek when having skipped too many entries. If the skipped entry just before the seek() is a delete, the saved key is erased so that it seeks to the front, so Prev() would return the first element.
      
      This patch fixes the bug by not doing seek() in DBIter::FindNextUserEntry() if saved key has been erased.
      
      Test Plan: Add a test DBTest.IterPrevMaxSkip which would fail without the patch and would pass with the change.
      
      Reviewers: dhruba, xjin, haobo
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D13557
      65428b0c
  18. 17 10月, 2013 1 次提交
  19. 05 10月, 2013 1 次提交
  20. 03 10月, 2013 1 次提交
  21. 07 9月, 2013 1 次提交
    • D
      An iterator may automatically invoke reseeks. · 197034e4
      Dhruba Borthakur 提交于
      Summary:
      An iterator invokes reseek if the number of sequential skips over the
      same userkey exceeds a configured number. This makes iter->Next()
      faster (bacause of fewer key compares) if a large number of
      adjacent internal keys in a table (sst or memtable) have the
      same userkey.
      
      Test Plan: Unit test DBTest.IterReseek.
      
      Reviewers: emayanke, haobo, xjin
      
      Reviewed By: xjin
      
      CC: leveldb, xjin
      
      Differential Revision: https://reviews.facebook.net/D11865
      197034e4
  22. 24 8月, 2013 1 次提交
  23. 21 8月, 2013 1 次提交
  24. 20 8月, 2013 1 次提交
    • D
      Merge operator fixes part 1. · e1346968
      Deon Nicholas 提交于
      Summary:
      -Added null checks and revisions to DBIter::MergeValuesNewToOld()
      -Added DBIter test to stringappend_test
      -Major fix with Merge and TTL
      More plans for fixes later.
      
      Test Plan:
      -make clean; make stringappend_test -j 32; ./stringappend_test
      -make all check;
      
      Reviewers: haobo, emayanke, vamsi, dhruba
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D12315
      e1346968
  25. 15 8月, 2013 1 次提交
    • J
      Implement log blobs · 0307c5fe
      Jim Paton 提交于
      Summary:
      This patch adds the ability for the user to add sequences of arbitrary data (blobs) to write batches. These blobs are saved to the log along with everything else in the write batch. You can add multiple blobs per WriteBatch and the ordering of blobs, puts, merges, and deletes are preserved.
      
      Blobs are not saves to SST files. RocksDB ignores blobs in every way except for writing them to the log.
      
      Before committing this patch, I need to add some test code. But I'm submitting it now so people can comment on the API.
      
      Test Plan: make -j32 check
      
      Reviewers: dhruba, haobo, vamsi
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D12195
      0307c5fe
  26. 06 8月, 2013 1 次提交
    • D
      [RocksDB] [MergeOperator] The new Merge Interface! Uses merge sequences. · c2d7826c
      Deon Nicholas 提交于
      Summary:
      Here are the major changes to the Merge Interface. It has been expanded
      to handle cases where the MergeOperator is not associative. It does so by stacking
      up merge operations while scanning through the key history (i.e.: during Get() or
      Compaction), until a valid Put/Delete/end-of-history is encountered; it then
      applies all of the merge operations in the correct sequence starting with the
      base/sentinel value.
      
      I have also introduced an "AssociativeMerge" function which allows the user to
      take advantage of associative merge operations (such as in the case of counters).
      The implementation will always attempt to merge the operations/operands themselves
      together when they are encountered, and will resort to the "stacking" method if
      and only if the "associative-merge" fails.
      
      This implementation is conjectured to allow MergeOperator to handle the general
      case, while still providing the user with the ability to take advantage of certain
      efficiencies in their own merge-operator / data-structure.
      
      NOTE: This is a preliminary diff. This must still go through a lot of review,
      revision, and testing. Feedback welcome!
      
      Test Plan:
        -This is a preliminary diff. I have only just begun testing/debugging it.
        -I will be testing this with the existing MergeOperator use-cases and unit-tests
      (counters, string-append, and redis-lists)
        -I will be "desk-checking" and walking through the code with the help gdb.
        -I will find a way of stress-testing the new interface / implementation using
      db_bench, db_test, merge_test, and/or db_stress.
        -I will ensure that my tests cover all cases: Get-Memtable,
      Get-Immutable-Memtable, Get-from-Disk, Iterator-Range-Scan, Flush-Memtable-to-L0,
      Compaction-L0-L1, Compaction-Ln-L(n+1), Put/Delete found, Put/Delete not-found,
      end-of-history, end-of-file, etc.
        -A lot of feedback from the reviewers.
      
      Reviewers: haobo, dhruba, zshao, emayanke
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D11499
      c2d7826c
  27. 29 5月, 2013 1 次提交
  28. 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
  29. 01 11月, 2011 1 次提交
    • H
      A number of fixes: · 36a5f8ed
      Hans Wennborg 提交于
      - Replace raw slice comparison with a call to user comparator.
        Added test for custom comparators.
      
      - Fix end of namespace comments.
      
      - Fixed bug in picking inputs for a level-0 compaction.
      
        When finding overlapping files, the covered range may expand
        as files are added to the input set.  We now correctly expand
        the range when this happens instead of continuing to use the
        old range.  For example, suppose L0 contains files with the
        following ranges:
      
            F1: a .. d
            F2:    c .. g
            F3:       f .. j
      
        and the initial compaction target is F3.  We used to search
        for range f..j which yielded {F2,F3}.  However we now expand
        the range as soon as another file is added.  In this case,
        when F2 is added, we expand the range to c..j and restart the
        search.  That picks up file F1 as well.
      
        This change fixes a bug related to deleted keys showing up
        incorrectly after a compaction as described in Issue 44.
      
      (Sync with upstream @25072954)
      36a5f8ed
  30. 16 8月, 2011 1 次提交
    • G
      Bugfixes for iterator and documentation. · ab323f7e
      gabor@google.com 提交于
      - Fix bug in Iterator::Prev where it would return the wrong key.
        Fixes issues 29 and 30.
      
      - Added a tweak to testharness to allow running just some tests.
      
      - Fixing two minor documentation errors based on issues 28 and 25.
      
      - Cleanup; fix namespaces of export-to-C code.
        Also fix one "const char*" vs "char*" mismatch.
      
      
      
      git-svn-id: https://leveldb.googlecode.com/svn/trunk@48 62dab493-f737-651d-591e-8d6aee1b9529
      ab323f7e
  31. 21 4月, 2011 1 次提交
  32. 20 4月, 2011 2 次提交
  33. 19 4月, 2011 1 次提交
  34. 13 4月, 2011 1 次提交
  35. 31 3月, 2011 1 次提交
  36. 29 3月, 2011 1 次提交
  37. 26 3月, 2011 1 次提交