1. 21 6月, 2018 2 次提交
    • Y
      Add file name info to SequentialFileReader. (#4026) · 524c6e6b
      Yanqin Jin 提交于
      Summary:
      We potentially need this information for tracing, profiling and diagnosis.
      Closes https://github.com/facebook/rocksdb/pull/4026
      
      Differential Revision: D8555214
      
      Pulled By: riversand963
      
      fbshipit-source-id: 4263e06c00b6d5410b46aa46eb4e358ff2161dd2
      524c6e6b
    • A
      Support file ingestion in stress test (#4018) · 14cee194
      Andrew Kryczka 提交于
      Summary:
      Once per `ingest_external_file_one_in` operations, uses SstFileWriter to create a file containing `ingest_external_file_width` consecutive keys. The file is named containing the thread ID to avoid clashes. The file is then added to the DB using `IngestExternalFile`.
      
      We can't enable it by default in crash test because `nooverwritepercent` and `test_batches_snapshot` both must be zero for the DB's whole lifetime. Perhaps we should setup a separate test with that config as range deletion also requires it.
      Closes https://github.com/facebook/rocksdb/pull/4018
      
      Differential Revision: D8507698
      
      Pulled By: ajkr
      
      fbshipit-source-id: 1437ea26fd989349a9ce8b94117241c65e40f10f
      14cee194
  2. 20 6月, 2018 4 次提交
  3. 19 6月, 2018 5 次提交
  4. 18 6月, 2018 1 次提交
  5. 16 6月, 2018 9 次提交
  6. 14 6月, 2018 4 次提交
    • A
      Check with PosixEnv before opening LOCK file (#3993) · 1f32dc7d
      Andrew Kryczka 提交于
      Summary:
      Rebased and resubmitting #1831 on behalf of stevelittle.
      
      The problem is when a single process attempts to open the same DB twice, the second attempt fails due to LOCK file held. If the second attempt had opened the LOCK file, it'll now need to close it, and closing causes the file to be unlocked. Then, any subsequent attempt to open the DB will succeed, which is the wrong behavior.
      
      The solution was to track which files a process has locked in PosixEnv, and check those before opening a LOCK file.
      
      Fixes #1780.
      Closes https://github.com/facebook/rocksdb/pull/3993
      
      Differential Revision: D8398984
      
      Pulled By: ajkr
      
      fbshipit-source-id: 2755fe66950a0c9de63075f932f9e15768041918
      1f32dc7d
    • A
      Run manual compaction in stress/crash tests (#3936) · 7497f992
      Andrew Kryczka 提交于
      Summary:
      - Add support to `db_stress` for `CompactRange`
      - Enable `CompactRange` and `CompactFiles` in crash tests
      Closes https://github.com/facebook/rocksdb/pull/3936
      
      Differential Revision: D8230953
      
      Pulled By: ajkr
      
      fbshipit-source-id: 208f9980b5bc8c204b1fa726e83791ad674e21e8
      7497f992
    • A
      Choose unique keys faster in db_stress (#3990) · dd216dd7
      Andrew Kryczka 提交于
      Summary:
      db_stress initialization randomly chooses a set of keys to not overwrite. It was doing it separately for each column family. That caused 30+ second initialization times for the non-simple crash tests, which have 10 CFs. This PR:
      
      - reuses the same set of randomly chosen no-overwrite keys across all CFs
      - logs a couple more timestamps so we can more easily see initialization time
      Closes https://github.com/facebook/rocksdb/pull/3990
      
      Differential Revision: D8393821
      
      Pulled By: ajkr
      
      fbshipit-source-id: d0b263a298df607285ffdd8b0983ff6575cc6c34
      dd216dd7
    • A
      Avoid acquiring SyncPoint mutex when it is disabled (#3991) · a7204018
      Andrew Kryczka 提交于
      Summary:
      In `db_stress` profile the vast majority of CPU time is spent acquiring the `SyncPoint` mutex. I mistakenly assumed #3939 had fixed this mutex contention problem by disabling `SyncPoint` processing. But actually the lock was still being acquired just to check whether processing is enabled. We can avoid that overhead by using an atomic to track whether it's enabled.
      Closes https://github.com/facebook/rocksdb/pull/3991
      
      Differential Revision: D8393825
      
      Pulled By: ajkr
      
      fbshipit-source-id: 5bc4e3c722ee7304e7a9c2439998c456b05a6897
      a7204018
  7. 13 6月, 2018 4 次提交
    • S
      Fix regression bug of Prev() with upper bound (#3989) · d82f1421
      Siying Dong 提交于
      Summary:
      A recent change pushed down the upper bound checking to child iterators. However, this causes the logic of following sequence wrong:
        Seek(key);
        if (!Valid()) SeekToLast();
      Because !Valid() may be caused by upper bounds, rather than the end of the iterator. In this case SeekToLast() points to totally wrong places. This can cause wrong results, infinite loops, or segfault in some cases.
      This sequence is called when changing direction from forward to backward. And this by itself also implicitly happen during reseeking optimization in Prev().
      
      Fix this bug by using SeekForPrev() rather than this sequuence, as what is already done in prefix extrator case.
      Closes https://github.com/facebook/rocksdb/pull/3989
      
      Differential Revision: D8385422
      
      Pulled By: siying
      
      fbshipit-source-id: 429e869990cfd2dc389421e0836fc496bed67bb4
      d82f1421
    • A
      Fix argument mismatch in BlockBasedTableBuilder (#3974) · 9d347332
      Andrew Kryczka 提交于
      Summary:
      The sixth argument should be `key_includes_seq` bool, the seventh a `GetContext*`. We were mistakenly passing the `GetContext*` as the sixth argument and relying on the default (nullptr) for the seventh. This would make statistics inaccurate, at least.
      
      Blame: 402b7aa0
      Closes https://github.com/facebook/rocksdb/pull/3974
      
      Differential Revision: D8344907
      
      Pulled By: ajkr
      
      fbshipit-source-id: 3ad865a0541d6d30f75dfc726352788118cfe12e
      9d347332
    • S
      Fix a crash in WinEnvIO::GetSectorSize (#3975) · 9c7da963
      shpala 提交于
      Summary:
      Fix a crash in `WinEnvIO::GetSectorSize` that happens on old Windows systems (e.g Windows 7).
      On old Windows systems that don't support querying StorageAccessAlignmentProperty using IOCTL_STORAGE_QUERY_PROPERTY, the flow calls a different DeviceIoControl with nullptr as lpBytesReturned.
      When the code reaches this point, we get an access violation.
      Closes https://github.com/facebook/rocksdb/pull/3975
      
      Differential Revision: D8385186
      
      Pulled By: ajkr
      
      fbshipit-source-id: fae4c9b4b0a52c8a10182e1b35bcaa30dc393bbb
      9c7da963
    • F
      Remove restart point from the properties_block (#3970) · 35932753
      Fenggang Wu 提交于
      Summary:
      Property block will be read sequentially and cached in a heap located
      object, so there's no need for restart points. Thus we set the restart
      interval to infinity to save space.
      Closes https://github.com/facebook/rocksdb/pull/3970
      
      Differential Revision: D8332586
      
      Pulled By: fgwu
      
      fbshipit-source-id: 899c3267832a81d0f084ec2db6b387332f461134
      35932753
  8. 09 6月, 2018 1 次提交
  9. 08 6月, 2018 3 次提交
    • Y
      Fix build errors. · 3470c758
      Yanqin Jin 提交于
      Summary: Closes https://github.com/facebook/rocksdb/pull/3967
      
      Differential Revision: D8322775
      
      Pulled By: riversand963
      
      fbshipit-source-id: bd73067bd5d3ed4627348f0685bc499359ad6442
      3470c758
    • Z
      Fixed the fprintf of uint64_t by using PRIu64 (#3963) · 23e1d236
      Zhichao Cao 提交于
      Summary:
      Fixed the fprintf format of uint64_t by using PRIu64 in file tools/ldb_cmd.cc
      Closes https://github.com/facebook/rocksdb/pull/3963
      
      Differential Revision: D8306179
      
      Pulled By: zhichao-cao
      
      fbshipit-source-id: 597dcd55321576801bbf2cf4714736ebc4750a0c
      23e1d236
    • Y
      Refactoring db_stress.cc (#3902) · 0a0860a5
      Yanqin Jin 提交于
      Summary:
      We use `db_stress.cc` intensively to test and verify the behavior of RocksDB. Sometimes we need to add new tests for recently added features. Original `StressTest` class provides many general functionality that can be leveraged by other tests. Therefore, in this refactoring PR, I try to identify the general operations as well as operations that future tests most likely want to customize. Future tests can inherit `StressTest` and overriding the virtual functions to test custom logic.
      Closes https://github.com/facebook/rocksdb/pull/3902
      
      Differential Revision: D8284607
      
      Pulled By: riversand963
      
      fbshipit-source-id: 019302d04665a2b18334b6d05d04a477168c8ea4
      0a0860a5
  10. 07 6月, 2018 3 次提交
  11. 06 6月, 2018 3 次提交
  12. 05 6月, 2018 1 次提交
    • M
      Extend some tests to format_version=3 (#3942) · d0c38c0c
      Maysam Yabandeh 提交于
      Summary:
      format_version=3 changes the format of SST index. This is however not being tested currently since tests only work with the default format_version which is currently 2. The patch extends the most related tests to also test for format_version=3.
      Closes https://github.com/facebook/rocksdb/pull/3942
      
      Differential Revision: D8238413
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: 915725f55753dd8e9188e802bf471c23645ad035
      d0c38c0c