1. 27 6月, 2017 1 次提交
  2. 25 6月, 2017 2 次提交
    • M
      Update rename of ParanoidCheck · 8e6345d2
      Maysam Yabandeh 提交于
      Summary: Closes https://github.com/facebook/rocksdb/pull/2494
      
      Differential Revision: D5317902
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: 097330292180816b3d0c9f4cbbdb6f68f0180200
      8e6345d2
    • M
      Optimize for serial commits in 2PC · 499ebb3a
      Maysam Yabandeh 提交于
      Summary:
      Throughput: 46k tps in our sysbench settings (filling the details later)
      
      The idea is to have the simplest change that gives us a reasonable boost
      in 2PC throughput.
      
      Major design changes:
      1. The WAL file internal buffer is not flushed after each write. Instead
      it is flushed before critical operations (WAL copy via fs) or when
      FlushWAL is called by MySQL. Flushing the WAL buffer is also protected
      via mutex_.
      2. Use two sequence numbers: last seq, and last seq for write. Last seq
      is the last visible sequence number for reads. Last seq for write is the
      next sequence number that should be used to write to WAL/memtable. This
      allows to have a memtable write be in parallel to WAL writes.
      3. BatchGroup is not used for writes. This means that we can have
      parallel writers which changes a major assumption in the code base. To
      accommodate for that i) allow only 1 WriteImpl that intends to write to
      memtable via mem_mutex_--which is fine since in 2PC almost all of the memtable writes
      come via group commit phase which is serial anyway, ii) make all the
      parts in the code base that assumed to be the only writer (via
      EnterUnbatched) to also acquire mem_mutex_, iii) stat updates are
      protected via a stat_mutex_.
      
      Note: the first commit has the approach figured out but is not clean.
      Submitting the PR anyway to get the early feedback on the approach. If
      we are ok with the approach I will go ahead with this updates:
      0) Rebase with Yi's pipelining changes
      1) Currently batching is disabled by default to make sure that it will be
      consistent with all unit tests. Will make this optional via a config.
      2) A couple of unit tests are disabled. They need to be updated with the
      serial commit of 2PC taken into account.
      3) Replacing BatchGroup with mem_mutex_ got a bit ugly as it requires
      releasing mutex_ beforehand (the same way EnterUnbatched does). This
      needs to be cleaned up.
      Closes https://github.com/facebook/rocksdb/pull/2345
      
      Differential Revision: D5210732
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: 78653bd95a35cd1e831e555e0e57bdfd695355a4
      499ebb3a
  3. 24 6月, 2017 2 次提交
  4. 23 6月, 2017 3 次提交
    • A
      Introduce OnBackgroundError callback · 71f5bcb7
      Andrew Kryczka 提交于
      Summary:
      Some users want to prevent rocksdb from entering read-only mode in certain error cases. This diff gives them a callback, `OnBackgroundError`, that they can use to achieve it.
      
      - call `OnBackgroundError` every time we consider setting `bg_error_`. Use its result to assign `bg_error_` but not to change the function's return status.
      - classified calls using `BackgroundErrorReason` to give the callback some info about where the error happened
      - renamed `ParanoidCheck` to something more specific so we can provide a clear `BackgroundErrorReason`
      - unit tests for the most common cases: flush or compaction errors
      Closes https://github.com/facebook/rocksdb/pull/2477
      
      Differential Revision: D5300190
      
      Pulled By: ajkr
      
      fbshipit-source-id: a0ea4564249719b83428e3f4c6ca2c49e366e9b3
      71f5bcb7
    • S
      Downgrade option sanitiy check level for prefix_extractor · 88cd2d96
      Siying Dong 提交于
      Summary:
      With c7004840, it's safe to open a DB with different prefix extractor. So it's safe to skip prefix extractor check.
      Closes https://github.com/facebook/rocksdb/pull/2474
      
      Differential Revision: D5294700
      
      Pulled By: siying
      
      fbshipit-source-id: eeb500da795eecb29b8c9c56a14cfd4afda12ecc
      88cd2d96
    • S
      Fix Data Race Between CreateColumnFamily() and GetAggregatedIntProperty() · 6837a176
      Siying Dong 提交于
      Summary:
      CreateColumnFamily() releases DB mutex after adding column family to the set and install super version (to write option file), so if users call GetAggregatedIntProperty() in the middle, then super version will be null and the process will crash. Fix it by skipping those column families without super version installed.
      
      Maybe we should also fix the problem of releasing the lock when reading option file, but it is more risky. so I'm doing a quick and safer fix and we can investigate it later.
      Closes https://github.com/facebook/rocksdb/pull/2475
      
      Differential Revision: D5298053
      
      Pulled By: siying
      
      fbshipit-source-id: 4b3c8f91c60400b163fcc6cda8a0c77723be0ef6
      6837a176
  5. 22 6月, 2017 1 次提交
  6. 21 6月, 2017 3 次提交
  7. 20 6月, 2017 1 次提交
  8. 19 6月, 2017 1 次提交
  9. 17 6月, 2017 1 次提交
  10. 16 6月, 2017 2 次提交
  11. 15 6月, 2017 4 次提交
  12. 14 6月, 2017 6 次提交
    • S
      Allow ignoring unknown options when loading options from a file · 89ad9f3a
      Sagar Vemuri 提交于
      Summary:
      Added a flag, `ignore_unknown_options`, to skip unknown options when loading an options file (using `LoadLatestOptions`/`LoadOptionsFromFile`) or while verifying options (using `CheckOptionsCompatibility`). This will help in downgrading the db to an older version.
      
      Also added `--ignore_unknown_options` flag to ldb
      
      **Example Use case:**
      In MyRocks, if copying from newer version to older version, it is often impossible to start because of new RocksDB options that don't exist in older version, even though data format is compatible.
      MyRocks uses these load and verify functions in [ha_rocksdb.cc::check_rocksdb_options_compatibility](https://github.com/facebook/mysql-5.6/blob/e004fd9f416821d043ccc8ad4a345c33ac9953f0/storage/rocksdb/ha_rocksdb.cc#L3348-L3401).
      
      **Test Plan:**
      Updated the unit tests.
      `make check`
      
      ldb:
      $ ./ldb --db=/tmp/test_db --create_if_missing put a1 b1
      OK
      
      Now edit /tmp/test_db/<OPTIONS-file> and add an unknown option.
      
      Try loading the options now, and it fails:
      $ ./ldb --db=/tmp/test_db --try_load_options get a1
      Failed: Invalid argument: Unrecognized option DBOptions:: abcd
      
      Passes with the new --ignore_unknown_options flag
      $ ./ldb --db=/tmp/test_db --try_load_options --ignore_unknown_options get a1
      b1
      Closes https://github.com/facebook/rocksdb/pull/2423
      
      Differential Revision: D5212091
      
      Pulled By: sagar0
      
      fbshipit-source-id: 2ec17636feb47dc0351b53a77e5f15ef7cbf2ca7
      89ad9f3a
    • H
      fixed typo · 6b5a5dc5
      hyunwoo 提交于
      Summary:
      fixed typo
      Closes https://github.com/facebook/rocksdb/pull/2430
      
      Differential Revision: D5242471
      
      Pulled By: IslamAbdelRahman
      
      fbshipit-source-id: 832eb3a4c70221444ccd2ae63217823fec56c748
      6b5a5dc5
    • H
      fixed typo in util/dynamic_bloom.h · 0f228be3
      haoxiang 提交于
      Summary:
      fixed a typo in util/dynamic_bloom.h
      Closes https://github.com/facebook/rocksdb/pull/2442
      
      Differential Revision: D5242397
      
      Pulled By: IslamAbdelRahman
      
      fbshipit-source-id: c47fd18cc79afff6b022201a0410c0cd47626576
      0f228be3
    • A
      Call RateLimiter for compaction reads · c217e0b9
      Andrew Kryczka 提交于
      Summary:
      Allow users to rate limit background work based on read bytes, written bytes, or sum of read and written bytes. Support these by changing the RateLimiter API, so no additional options were needed.
      Closes https://github.com/facebook/rocksdb/pull/2433
      
      Differential Revision: D5216946
      
      Pulled By: ajkr
      
      fbshipit-source-id: aec57a8357dbb4bfde2003261094d786d94f724e
      c217e0b9
    • Y
      write exact sequence number for each put in write batch · 91e2aa3c
      Yi Wu 提交于
      Summary:
      At the beginning of write batch write, grab the latest sequence from base db and assume sequence number will increment by 1 for each put and delete, and write the exact sequence number with each put. This is assuming we are the only writer to increment sequence number (no external file ingestion, etc) and there should be no holes in the sequence number.
      
      Also having some minor naming changes.
      Closes https://github.com/facebook/rocksdb/pull/2402
      
      Differential Revision: D5176134
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: cb4712ee44478d5a2e5951213a10b72f08fe8c88
      91e2aa3c
    • M
      record index partition properties · 6f4154d6
      Maysam Yabandeh 提交于
      Summary:
      When Partitioning index/filter is enabled the user might need to check the index block size as well as the top-level index size via sst_dump. This patch records i) number of partitions, ii) top-level index size and make it accessible through sst_dump. The number of partitions for filters is the same as that of indexes. The top-level index for filters has a similar size to top-level index for indexes, so it is not repeated.
      Closes https://github.com/facebook/rocksdb/pull/2437
      
      Differential Revision: D5224225
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: 5324598c75793523aef1bb7ee225a5475e95a9cb
      6f4154d6
  13. 13 6月, 2017 7 次提交
  14. 12 6月, 2017 2 次提交
  15. 10 6月, 2017 1 次提交
  16. 09 6月, 2017 3 次提交