1. 29 9月, 2016 7 次提交
  2. 28 9月, 2016 3 次提交
    • W
      fix typo in comments (#1360) · 4defe306
      wenduo 提交于
      * fix typo in option.h's comment
      
      * fix typo in checkpoint's comment
      4defe306
    • A
      Add SeekForPrev() to Iterator · f517d9dd
      Aaron Gao 提交于
      Summary:
      Add new Iterator API, `SeekForPrev`: find the last key that <= target key
      support prefix_extractor
      support prefix_same_as_start
      support upper_bound
      not supported in iterators without Prev()
      
      Also add tests in db_iter_test and db_iterator_test
      
      Pass all tests
      Cheers!
      
      Test Plan: make all check -j64
      
      Reviewers: andrewkr, yiwu, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D64149
      f517d9dd
    • Y
      Recompute compaction score on SetOptions (#1346) · eb3894cf
      yiwu-arbug 提交于
      Summary: We didn't recompute compaction score on SetOptions, and end up not having compaction if no flush happens afterward. The PR fixing it.
      
      Test Plan: See unit test.
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D64167
      eb3894cf
  3. 27 9月, 2016 2 次提交
    • I
      Fix AddFile() conflict with compaction output [WaitForAddFile()] · 5c64fb67
      Islam AbdelRahman 提交于
      Summary:
      Since AddFile unlock/lock the mutex inside LogAndApply() we need to ensure that during this period other compactions cannot run since such compactions are not aware of the file we are ingesting and could create a compaction that overlap wit this file
      
      this diff add
      - WaitForAddFile() call that will ensure that no AddFile() calls are being processed right now
      - Call `WaitForAddFile()` in 3 locations
      -- When doing manual Compaction
      -- When starting automatic Compaction
      -- When  doing CompactFiles()
      
      Test Plan: unit test
      
      Reviewers: lightmark, yiwu, andrewkr, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, yoshinorim, jkedgar, dhruba
      
      Differential Revision: https://reviews.facebook.net/D64383
      5c64fb67
    • I
      9e9f5a0b
  4. 24 9月, 2016 3 次提交
    • A
      not cut compaction output when compact to level 0 · c2a62a4c
      Aaron Gao 提交于
      Summary: we should not call ShouldStopBefore() in compaction when the compaction targets level 0. Otherwise, CheckConsistency will fail the assertion of seq number check on level 0.
      
      Test Plan:
      make all check -j64
      I also manully test that using db_bench to compact files to level 0. Without this line change, the assertion files and multiple files are generated on level 0 after compaction.
      
      Reviewers: yhchiang, andrewkr, yiwu, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D64269
      c2a62a4c
    • Y
      Split DBOptions into ImmutableDBOptions and MutableDBOptions · 9ed928e7
      Yi Wu 提交于
      Summary: Use ImmutableDBOptions/MutableDBOptions internally and DBOptions only for user-facing APIs. MutableDBOptions is barely a placeholder for now. I'll start to move options to MutableDBOptions in following diffs.
      
      Test Plan:
        make all check
      
      Reviewers: yhchiang, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D64065
      9ed928e7
    • Y
      Recover same sequence id from WAL (#1350) · 4bc8c88e
      yiwu-arbug 提交于
      Summary:
      Revert the behavior where we don't read sequence id from WAL, but increase it as we replay the log. We still keep the behave for 2PC for now but will fix later.
      
      This change fixes github issue 1339, where some writes come with WAL disabled and we may recover records with wrong sequence id.
      
      Test Plan: Added unit test.
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D64275
      4bc8c88e
  5. 23 9月, 2016 1 次提交
    • A
      add cfh deletion started listener · 0a1bd9c5
      Aaron Gao 提交于
      Summary: add ColumnFamilyHandleDeletionStarted listener which can be called when user deletes handler.
      
      Test Plan: ./listener_test
      
      Reviewers: yiwu, IslamAbdelRahman, sdong, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D60717
      0a1bd9c5
  6. 22 9月, 2016 4 次提交
  7. 21 9月, 2016 4 次提交
  8. 20 9月, 2016 3 次提交
    • S
      DBImpl::GetWalPreallocateBlockSize() should return size_t · d78a4401
      sdong 提交于
      Summary: WritableFile::SetPreallocationBlockSize() requires parameter as size_t, and options used in DBImpl::GetWalPreallocateBlockSize() are all size_t. WritableFile::SetPreallocationBlockSize() should return size_t to avoid build break if size_t is not uint64_t.
      
      Test Plan: Run existing tests.
      
      Reviewers: andrewkr, IslamAbdelRahman, yiwu
      
      Reviewed By: yiwu
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D64137
      d78a4401
    • I
      Retry getting arcanist token on failure · 42ac9c5f
      Islam AbdelRahman 提交于
      Summary:
      Many of our diffs dont have sandcastle tests because we failed to load arcanist token file (loaded over the network)
      this diff try for at least 5 seconds (once every 0.2 second) to load the file instead of failing the first time the file is not found
      This will make it less probable that diffs are submitted without sandcastle tests
      
      Test Plan: arc diff --preview
      
      Reviewers: kradhakrishnan, gunnarku, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D63951
      42ac9c5f
    • S
      Consider more factors when determining preallocation size of WAL files · b666f854
      sdong 提交于
      Summary: Currently the WAL file preallocation size is 1.1 * write_buffer_size. This, however, will be over-estimated if options.db_write_buffer_size or options.max_total_wal_size is set and is much smaller.
      
      Test Plan: Add a unit test.
      
      Reviewers: andrewkr, yiwu
      
      Reviewed By: yiwu
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D63957
      b666f854
  9. 18 9月, 2016 1 次提交
  10. 17 9月, 2016 3 次提交
  11. 16 9月, 2016 4 次提交
    • Y
      Fix DBOptionsTest.GetLatestOptions · 8d9bf5c4
      Yi Wu 提交于
      Summary: RandomInitCFOptions will allocate a new compaction filter, which we have to delete afterward.
      
      Test Plan: valgrind against the test
      
      Reviewers: IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D64011
      8d9bf5c4
    • Y
      Fix DBWALTest.RecoveryWithLogDataForSomeCFs with mac · 40cfa3e0
      Yi Wu 提交于
      Summary: Seems there's no std::array on mac+clang. Use raw array instead.
      
      Test Plan: run ./db_wal_test on mac.
      
      Reviewers: andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D64005
      40cfa3e0
    • A
      Fix recovery for WALs without data for all CFs · 06b4785f
      Andrew Kryczka 提交于
      Summary:
      if one or more CFs had no data in the WAL, the log number that's used
      by FindObsoleteFiles() wasn't updated. We need to treat this case the same as
      if the data for that WAL had been flushed.
      
      Test Plan: new unit test
      
      Reviewers: IslamAbdelRahman, yiwu, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D63963
      06b4785f
    • A
      Fix GetSortedWalFiles when log recycling enabled · d7242ff4
      Andrew Kryczka 提交于
      Summary:
      Previously the sequence number was mistakenly passed in an argument
      where the log number should go. This caused the reader to assume the old WAL
      format was used, which is incompatible with the WAL recycling format.
      
      Test Plan:
      new unit test, verified it fails before this change and passes
      afterwards.
      
      Reviewers: yiwu, lightmark, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D63987
      d7242ff4
  12. 15 9月, 2016 5 次提交