1. 09 3月, 2018 1 次提交
  2. 08 3月, 2018 2 次提交
  3. 07 3月, 2018 10 次提交
    • S
      Add rocksdb_open_with_ttl function in C API · f021f1d9
      Stuart 提交于
      Summary:
      Change-Id: Ie6f9b10bce459f6bf0ade0e5877264b4e10da3f5
      Signed-off-by: NStuart <Stuart.Hu@emc.com>
      Closes https://github.com/facebook/rocksdb/pull/3553
      
      Differential Revision: D7144833
      
      Pulled By: sagar0
      
      fbshipit-source-id: 815225fa6e560d8a5bc47ffd0a98118b107ce264
      f021f1d9
    • A
      Disallow compactions if there isn't enough free space · 0a3db28d
      amytai 提交于
      Summary:
      This diff handles cases where compaction causes an ENOSPC error.
      This does not handle corner cases where another background job is started while compaction is running, and the other background job triggers ENOSPC, although we do allow the user to provision for these background jobs with SstFileManager::SetCompactionBufferSize.
      It also does not handle the case where compaction has finished and some other background job independently triggers ENOSPC.
      
      Usage: Functionality is inside SstFileManager. In particular, users should set SstFileManager::SetMaxAllowedSpaceUsage, which is the reference highwatermark for determining whether to cancel compactions.
      Closes https://github.com/facebook/rocksdb/pull/3449
      
      Differential Revision: D7016941
      
      Pulled By: amytai
      
      fbshipit-source-id: 8965ab8dd8b00972e771637a41b4e6c645450445
      0a3db28d
    • A
      Enable subcompactions in manual level-based compaction · 20c508c1
      Andrew Kryczka 提交于
      Summary:
      This is the simplest way I could think of to speed up `CompactRange`. It works but isn't that optimal because it relies on the same `max_compaction_bytes` and `max_subcompactions` options that are used in other places. If it turns out to be useful we can allow overriding these in `CompactRangeOptions` in the future.
      Closes https://github.com/facebook/rocksdb/pull/3549
      
      Differential Revision: D7117634
      
      Pulled By: ajkr
      
      fbshipit-source-id: d0cd03d6bd0d2fd7ea3fb13cd3b8bf7c47d11e42
      20c508c1
    • F
      Add dual-license info to README.md · 3462c94b
      Fosco Marotto 提交于
      Summary:
      From #3417 and after talking to both GitHub and our open source legal team, the recommended approach was to explicitly state the dual-license in the readme.
      
      Changing the license files to accommodate the auto-detection is too much of a pain, would involve editing every code file header.
      Closes https://github.com/facebook/rocksdb/pull/3541
      
      Differential Revision: D7171111
      
      Pulled By: gfosco
      
      fbshipit-source-id: 0ee7b134446015228249efe991fa5e76526ca0b0
      3462c94b
    • A
      support multiple db_paths in SstFileManager · 6a3eebba
      Andrew Kryczka 提交于
      Summary:
      Now that files scheduled for deletion are kept in the same directory, we don't need to constrain deletion scheduler to `db_paths[0]`. Previously this was done because there was a separate trash directory, and this constraint prevented files from being accidentally copied to another filesystem when they're scheduled for deletion.
      Closes https://github.com/facebook/rocksdb/pull/3544
      
      Differential Revision: D7093786
      
      Pulled By: ajkr
      
      fbshipit-source-id: 202f5c92d925eafebec1281fb95bb5828d33414f
      6a3eebba
    • F
      uint64_t and size_t changes to compile for iOS · d518fe1d
      Fosco Marotto 提交于
      Summary:
      In attempting to build a static lib for use in iOS, I ran in to lots of type errors between uint64_t and size_t.  This PR contains the changes I made to get `TARGET_OS=IOS make static_lib` to succeed while also getting Xcode to build successfully with the resulting `librocksdb.a` library imported.
      
      This also compiles for me on macOS and tests fine, but I'm really not sure if I made the correct decisions about where to `static_cast` and where to change types.
      
      Also up for discussion: is iOS worth supporting?  Getting the static lib is just part one, we aren't providing any bridging headers or wrappers like the ObjectiveRocks project, it won't be a great experience.
      Closes https://github.com/facebook/rocksdb/pull/3503
      
      Differential Revision: D7106457
      
      Pulled By: gfosco
      
      fbshipit-source-id: 82ac2073de7e1f09b91f6b4faea91d18bd311f8e
      d518fe1d
    • S
      Update TARGETS · 8bc41f4f
      Siying Dong 提交于
      Summary:
      Watch the build
      Closes https://github.com/facebook/rocksdb/pull/3533
      
      Differential Revision: D7063777
      
      Pulled By: siying
      
      fbshipit-source-id: db9cdfc362a8d281dada6513ab034a6d6f0d552e
      8bc41f4f
    • D
      Windows cumulative patch · c364eb42
      Dmitri Smirnov 提交于
      Summary:
      This patch addressed several issues.
        Portability including db_test std::thread -> port::Thread Cc: @
        and %z to ROCKSDB portable macro. Cc: maysamyabandeh
      
        Implement Env::AreFilesSame
      
        Make the implementation of file unique number more robust
      
        Get rid of C-runtime and go directly to Windows API when dealing
        with file primitives.
      
        Implement GetSectorSize() and aling unbuffered read on the value if
        available.
      
        Adjust Windows Logger for the new interface, implement CloseImpl() Cc: anand1976
      
        Fix test running script issue where $status var was of incorrect scope
        so the failures were swallowed and not reported.
      
        DestroyDB() creates a logger and opens a LOG file in the directory
        being cleaned up. This holds a lock on the folder and the cleanup is
        prevented. This fails one of the checkpoin tests. We observe the same in production.
        We close the log file in this change.
      
       Fix DBTest2.ReadAmpBitmapLiveInCacheAfterDBClose failure where the test
       attempts to open a directory with NewRandomAccessFile which does not
       work on Windows.
        Fix DBTest.SoftLimit as it is dependent on thread timing. CC: yiwu-arbug
      Closes https://github.com/facebook/rocksdb/pull/3552
      
      Differential Revision: D7156304
      
      Pulled By: siying
      
      fbshipit-source-id: 43db0a757f1dfceffeb2b7988043156639173f5b
      c364eb42
    • Y
      Blob DB: Improve FIFO eviction · b864bc9b
      Yi Wu 提交于
      Summary:
      Improving blob db FIFO eviction with the following changes,
      * Change blob_dir_size to max_db_size. Take into account SST file size when computing DB size.
      * FIFO now only take into account live sst files and live blob files. It is normal for disk usage to go over max_db_size because there are obsolete sst files and blob files pending deletion.
      * FIFO eviction now also evict TTL blob files that's still open. It doesn't evict non-TTL blob files.
      * If FIFO is triggered, it will pass an expiration and the current sequence number to compaction filter. Compaction filter will then filter inlined keys to evict those with an earlier expiration and smaller sequence number. So call LSM FIFO.
      * Compaction filter also filter those blob indexes where corresponding blob file is gone.
      * Add an event listener to listen compaction/flush event and update sst file size.
      * Implement DB::Close() to make sure base db, as well as event listener and compaction filter, destruct before blob db.
      * More blob db statistics around FIFO.
      * Fix some locking issue when accessing a blob file.
      Closes https://github.com/facebook/rocksdb/pull/3556
      
      Differential Revision: D7139328
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: ea5edb07b33dfceacb2682f4789bea61de28bbfa
      b864bc9b
    • P
      Added bytes XOR merge operator · 0a2354ca
      Pooya Shareghi 提交于
      Summary:
      Closes https://github.com/facebook/rocksdb/pull/575
      
      I fixed the merge conflicts etc.
      Closes https://github.com/facebook/rocksdb/pull/3065
      
      Differential Revision: D7128233
      
      Pulled By: sagar0
      
      fbshipit-source-id: 2c23a48c9f0432c290b0cd16a12fb691bb37820c
      0a2354ca
  4. 06 3月, 2018 6 次提交
  5. 03 3月, 2018 4 次提交
  6. 02 3月, 2018 2 次提交
    • M
      Fix a leak in prepared_section_completed_ · d060421c
      Maysam Yabandeh 提交于
      Summary:
      The zeroed entries were not removed from prepared_section_completed_ map. This patch adds a unit test to show the problem and fixes that by refactoring the code. The new code is more efficient since i) it uses two separate mutex to avoid contention between commit and prepare threads, ii) it uses a sorted vector for maintaining uniq log entires with prepare which avoids a very large heap with many duplicate entries.
      Closes https://github.com/facebook/rocksdb/pull/3545
      
      Differential Revision: D7106071
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: b3ae17cb6cd37ef10b6b35e0086c15c758768a48
      d060421c
    • Y
      Add "rocksdb.live-sst-files-size" DB property · bf937cf1
      Yi Wu 提交于
      Summary:
      Add "rocksdb.live-sst-files-size" DB property which only include files of latest version. Existing "rocksdb.total-sst-files-size" include files from all versions and thus include files that's obsolete but not yet deleted. I'm going to use this new property to cap blob db sst + blob files size.
      Closes https://github.com/facebook/rocksdb/pull/3548
      
      Differential Revision: D7116939
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: c6a52e45ce0f24ef78708156e1a923c1dd6bc79a
      bf937cf1
  7. 01 3月, 2018 1 次提交
  8. 28 2月, 2018 2 次提交
    • A
      skip CompactRange flush based on memtable contents · 3ae00472
      Andrew Kryczka 提交于
      Summary:
      CompactRange has a call to Flush because we guarantee that, at the time it's called, all existing keys in the range will be pushed through the user's compaction filter. However, previously the flush was done blindly, so it'd happen even if the memtable does not contain keys in the range specified by the user. This caused unnecessarily many L0 files to be created, leading to write stalls in some cases. This PR checks the memtable's contents, and decides to flush only if it overlaps with `CompactRange`'s range.
      
      - Move the memtable overlap check logic from `ExternalSstFileIngestionJob` to `ColumnFamilyData::RangesOverlapWithMemtables`
      - Reuse the above logic in `CompactRange` and skip flushing if no overlap
      Closes https://github.com/facebook/rocksdb/pull/3520
      
      Differential Revision: D7018897
      
      Pulled By: ajkr
      
      fbshipit-source-id: a3c6b1cfae56687b49dd89ccac7c948e53545934
      3ae00472
    • S
      Update comments in DB::Close() · c287c098
      Siying Dong 提交于
      Summary: Closes https://github.com/facebook/rocksdb/pull/3543
      
      Differential Revision: D7093251
      
      Pulled By: siying
      
      fbshipit-source-id: 4066b82c95ecb65866c5842d68ab13ab9f85d567
      c287c098
  9. 27 2月, 2018 3 次提交
    • I
      Adding CentOS 7 Vagrantfile & build script · d6336563
      Istvan Szukacs 提交于
      Summary:
      I have updated the Vagrantfile to have an entry for CentOS 7. Also created a simple build script which is pretty similar to the one in Beringei.
      
      How to test:
      ```
      vagrant up centos7
      ```
      Todo:
      
      Implement -j X for the build.
      Closes https://github.com/facebook/rocksdb/pull/3530
      
      Differential Revision: D7090739
      
      Pulled By: ajkr
      
      fbshipit-source-id: 9f9eda5b507568993543d08de7ce168dfc12282e
      d6336563
    • Z
      DB:Open should fail on tmpfs when use_direct_reads=true · ad05cbb1
      Zhongyi Xie 提交于
      Summary:
      Before:
      
      > $ TEST_TMPDIR=/dev/shm ./db_bench -use_direct_reads=true -benchmarks=readrandomwriterandom -num=10000000 -reads=100000 -write_buffer_size=1048576 -target_file_size_base=1048576 -max_bytes_for_level_base=4194304 -max_background_jobs=12 -readwritepercent=50 -key_size=16 -value_size=48 -threads=32
      DB path: [/dev/shm/dbbench]
      put error: IO error: While open a file for random read: /dev/shm/dbbench/000007.sst: Invalid argument
      put error: IO error: While open a file for random read: /dev/shm/dbbench/000007.sst: Invalid argument
      put error: IO error: While open a file for random read: /dev/shm/dbbench/000007.sst: Invalid argument
      put error: IO error: While open a file for random read: /dev/shm/dbbench/000007.sst: Invalid argument
      put error: IO error: While open a file for random read: /dev/shm/dbbench/000007.sst: Invalid argument
      put error: IO error: While open a file for random read: /dev/shm/dbbench/000007.sst: Invalid argument
      put error: IO error: While open a file for random read: /dev/shm/dbbench/000007.sst: Invalid argument
      put error: IO error: While open a file for random read: /dev/shm/dbbench/000007.sst: Invalid argument
      put error: IO error: While open a file for random read: /dev/shm/dbbench/000007.sst: Invalid argument
      db_bench: tpp.c:84: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)' failed.
      put error: IO error: While open a file for random read: /dev/shm/dbbench/000007.sst: Invalid argument
      put error: IO error: While open a file for random read: /dev/shm/dbbench/000007.sst: Invalid argument
      
      After:
      > TEST_TMPDIR=/dev/shm ./db_bench -use_direct_reads=true -benchmarks=readrandomwriterandom -num=10000000 -reads=100000 -write_buffer_size=1048576 -target_file_size_base=1048576 -max_bytes_for_level_base=4194304 -max_background_jobs=12 -readwritepercent=50 -key_size=16 -value_size=48 -threads=32
      Initializing RocksDB Options from the specified file
      Initializing RocksDB Options from command-line flags
      open error: Not implemented: Direct I/O is not supported by the specified DB.
      Closes https://github.com/facebook/rocksdb/pull/3539
      
      Differential Revision: D7082658
      
      Pulled By: miasantreble
      
      fbshipit-source-id: f9d9c6ec3b5e9e049cab52154940ee101ba4d342
      ad05cbb1
    • D
      Fix a memory leak in WindowsThread · 7eb292da
      Dmitri Smirnov 提交于
      Summary:
      _endthreadex does not return and thus objects
        for stack destructors do not run. This creates a memory leak.
        We remove the calls since _enthreadex called automatically after the
        threadproc returns i.e. thread exits.
      Closes https://github.com/facebook/rocksdb/pull/3542
      
      Differential Revision: D7088713
      
      Pulled By: ajkr
      
      fbshipit-source-id: 749ecafc6a9572f587f76e516547e07734349a54
      7eb292da
  10. 24 2月, 2018 2 次提交
  11. 23 2月, 2018 5 次提交
  12. 22 2月, 2018 2 次提交
    • A
      BackupEngine gluster-friendly file naming convention · b0929776
      Andrew Kryczka 提交于
      Summary:
      Use the rsync tempfile naming convention in our `BackupEngine`. The temp file follows the format, `.<filename>.<suffix>`, which is later renamed to `<filename>`. We fix `tmp` as the `<suffix>` as we don't need to use random bytes for now. The benefit is gluster treats this tempfile naming convention specially and applies hashing only to `<filename>`, so the file won't need to be linked or moved when it's renamed. Our gluster team suggested this will make things operationally easier.
      Closes https://github.com/facebook/rocksdb/pull/3463
      
      Differential Revision: D6893333
      
      Pulled By: ajkr
      
      fbshipit-source-id: fd7622978f4b2487fce33cde40dd3124f16bcaa8
      b0929776
    • M
      WritePrepared Txn: fix non-emptied PreparedHeap bug · 828211e9
      Maysam Yabandeh 提交于
      Summary:
      Under a certain sequence of accessing PreparedHeap, there was a bug that would not successfully empty the heap. This would result in performance issues when the heap content is moved to old_prepared_ after max_evicted_seq_ advances the orphan prepared sequence numbers. The patch fixed the bug and add more unit tests. It also does more logging when the unlikely scenarios are faced
      Closes https://github.com/facebook/rocksdb/pull/3526
      
      Differential Revision: D7038486
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: f1e40bea558f67b03d2a29131fcb8734c65fce97
      828211e9