1. 23 3月, 2018 10 次提交
    • Z
      FlushReason improvement · 1cbc96d2
      Zhongyi Xie 提交于
      Summary:
      Right now flush reason "SuperVersion Change" covers a few different scenarios which is a bit vague. For example, the following db_bench job should trigger "Write Buffer Full"
      
      > $ TEST_TMPDIR=/dev/shm ./db_bench -benchmarks=fillrandom -write_buffer_size=1048576 -target_file_size_base=1048576 -max_bytes_for_level_base=4194304
      $ grep 'flush_reason' /dev/shm/dbbench/LOG
      ...
      2018/03/06-17:30:42.543638 7f2773b99700 EVENT_LOG_v1 {"time_micros": 1520386242543634, "job": 192, "event": "flush_started", "num_memtables": 1, "num_entries": 7006, "num_deletes": 0, "memory_usage": 1018024, "flush_reason": "SuperVersion Change"}
      2018/03/06-17:30:42.569541 7f2773b99700 EVENT_LOG_v1 {"time_micros": 1520386242569536, "job": 193, "event": "flush_started", "num_memtables": 1, "num_entries": 7006, "num_deletes": 0, "memory_usage": 1018104, "flush_reason": "SuperVersion Change"}
      2018/03/06-17:30:42.596396 7f2773b99700 EVENT_LOG_v1 {"time_micros": 1520386242596392, "job": 194, "event": "flush_started", "num_memtables": 1, "num_entries": 7008, "num_deletes": 0, "memory_usage": 1018048, "flush_reason": "SuperVersion Change"}
      2018/03/06-17:30:42.622444 7f2773b99700 EVENT_LOG_v1 {"time_micros": 1520386242622440, "job": 195, "event": "flush_started", "num_memtables": 1, "num_entries": 7006, "num_deletes": 0, "memory_usage": 1018104, "flush_reason": "SuperVersion Change"}
      
      With the fix:
      > 2018/03/19-14:40:02.341451 7f11dc257700 EVENT_LOG_v1 {"time_micros": 1521495602341444, "job": 98, "event": "flush_started", "num_memtables": 1, "num_entries": 7009, "num_deletes": 0, "memory_usage": 1018008, "flush_reason": "Write Buffer Full"}
      2018/03/19-14:40:02.379655 7f11dc257700 EVENT_LOG_v1 {"time_micros": 1521495602379642, "job": 100, "event": "flush_started", "num_memtables": 1, "num_entries": 7006, "num_deletes": 0, "memory_usage": 1018016, "flush_reason": "Write Buffer Full"}
      2018/03/19-14:40:02.418479 7f11dc257700 EVENT_LOG_v1 {"time_micros": 1521495602418474, "job": 101, "event": "flush_started", "num_memtables": 1, "num_entries": 7009, "num_deletes": 0, "memory_usage": 1018104, "flush_reason": "Write Buffer Full"}
      2018/03/19-14:40:02.455084 7f11dc257700 EVENT_LOG_v1 {"time_micros": 1521495602455079, "job": 102, "event": "flush_started", "num_memtables": 1, "num_entries": 7009, "num_deletes": 0, "memory_usage": 1018048, "flush_reason": "Write Buffer Full"}
      2018/03/19-14:40:02.492293 7f11dc257700 EVENT_LOG_v1 {"time_micros": 1521495602492288, "job": 104, "event": "flush_started", "num_memtables": 1, "num_entries": 7007, "num_deletes": 0, "memory_usage": 1018056, "flush_reason": "Write Buffer Full"}
      2018/03/19-14:40:02.528720 7f11dc257700 EVENT_LOG_v1 {"time_micros": 1521495602528715, "job": 105, "event": "flush_started", "num_memtables": 1, "num_entries": 7006, "num_deletes": 0, "memory_usage": 1018104, "flush_reason": "Write Buffer Full"}
      2018/03/19-14:40:02.566255 7f11dc257700 EVENT_LOG_v1 {"time_micros": 1521495602566238, "job": 107, "event": "flush_started", "num_memtables": 1, "num_entries": 7009, "num_deletes": 0, "memory_usage": 1018112, "flush_reason": "Write Buffer Full"}
      Closes https://github.com/facebook/rocksdb/pull/3627
      
      Differential Revision: D7328772
      
      Pulled By: miasantreble
      
      fbshipit-source-id: 67c94065fbdd36930f09930aad0aaa6d2c152bb8
      1cbc96d2
    • A
      Add unit test for WAL corruption · 82137f0c
      Andrew Kryczka 提交于
      Summary: Closes https://github.com/facebook/rocksdb/pull/3618
      
      Differential Revision: D7301053
      
      Pulled By: ajkr
      
      fbshipit-source-id: a9dde90caa548c294d03d6386f78428c8536ca14
      82137f0c
    • S
      Fsync after writing global seq number in ExternalSstFileIngestionJob · 2e3d4077
      Sagar Vemuri 提交于
      Summary:
      Fsync after writing global sequence number to the ingestion file in ExternalSstFileIngestionJob. Otherwise the file metadata could be incorrect.
      Closes https://github.com/facebook/rocksdb/pull/3644
      
      Differential Revision: D7373813
      
      Pulled By: sagar0
      
      fbshipit-source-id: 4da2c9e71a8beb5c08b4ac955f288ee1576358b8
      2e3d4077
    • A
      Rename function for handling WAL write error · 4d51feab
      Andrew Kryczka 提交于
      Summary:
      It was misnamed. It actually updates `bg_error_` if `PreprocessWrite()` or `WriteToWAL()` fail, not related to the user callback.
      Closes https://github.com/facebook/rocksdb/pull/3485
      
      Differential Revision: D6955787
      
      Pulled By: ajkr
      
      fbshipit-source-id: bd7afc3fdb7a52830c021cbfc25fcbc3ab7d5e10
      4d51feab
    • S
      SstFileManager: add bytes_max_delete_chunk · 118058ba
      Siying Dong 提交于
      Summary:
      Add `bytes_max_delete_chunk` in SstFileManager so that we can drop a large file in multiple batches.
      Closes https://github.com/facebook/rocksdb/pull/3640
      
      Differential Revision: D7358679
      
      Pulled By: siying
      
      fbshipit-source-id: ef17f0da2f5723dbece2669485a9b91b3edc0bb7
      118058ba
    • A
      log value of CompressionOptions::zstd_max_train_bytes · 88c3e26c
      Andrew Kryczka 提交于
      Summary: Closes https://github.com/facebook/rocksdb/pull/3587
      
      Differential Revision: D7206901
      
      Pulled By: ajkr
      
      fbshipit-source-id: 5d4b1a2653627b44aa3c22db7d98c9cd5dcdb67a
      88c3e26c
    • A
      parse CompressionOptions::zstd_max_train_bytes in options string · 620823f8
      Andrew Kryczka 提交于
      Summary: Closes https://github.com/facebook/rocksdb/pull/3588
      
      Differential Revision: D7208087
      
      Pulled By: ajkr
      
      fbshipit-source-id: 688f7a7c447cb17bee1b410d1fd891c0bf966617
      620823f8
    • F
      Update history for future 5.13 release · de6cf95a
      Fosco Marotto 提交于
      Summary: Closes https://github.com/facebook/rocksdb/pull/3631
      
      Differential Revision: D7367519
      
      Pulled By: gfosco
      
      fbshipit-source-id: 57826cc1c9ffc9f2b351075567b8ad929809cb74
      de6cf95a
    • M
      WritePrepared Txn: fix race condition on publishing seq · 7429b20e
      Maysam Yabandeh 提交于
      Summary:
      This commit fixes a race condition on calling SetLastPublishedSequence. The function must be called only from the 2nd write queue when two_write_queues is enabled. However there was a bug that would also call it from the main write queue if CommitTimeWriteBatch is provided to the commit request and yet use_only_the_last_commit_time_batch_for_recovery optimization is not enabled. To fix that we penalize the commit request in such cases by doing an additional write solely to publish the seq number from the 2nd queue.
      Closes https://github.com/facebook/rocksdb/pull/3641
      
      Differential Revision: D7361508
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: bf8f7a27e5cccf5425dccbce25eb0032e8e5a4d7
      7429b20e
    • R
      Fixed buffer overrun in BackupEngineImpl::BackupMeta::StoreToFile · fa8c050e
      Rohan Rathi 提交于
      Summary:
      The 10MB buffer in BackupEngineImpl::BackupMeta::StoreToFile can be corrupted with a large number of files. Added a check to determine current buffer length and append data to file if buffer becomes full.
      
      Resolves https://github.com/facebook/rocksdb/issues/3228
      Closes https://github.com/facebook/rocksdb/pull/3636
      
      Differential Revision: D7354160
      
      Pulled By: ajkr
      
      fbshipit-source-id: eec12d38095a0d17551a4aaee52b99d30a555722
      fa8c050e
  2. 22 3月, 2018 6 次提交
  3. 21 3月, 2018 3 次提交
  4. 20 3月, 2018 2 次提交
    • A
      fix db_compaction_test when compression disabled · d1b26507
      Andrew Kryczka 提交于
      Summary:
      Previously, the compaction in `DBCompactionTestWithParam.ForceBottommostLevelCompaction` generated multiple files in no-compression use case, andone file in compression use case. I increased `target_file_size_base` so it generates one file in both use cases.
      Closes https://github.com/facebook/rocksdb/pull/3625
      
      Differential Revision: D7311885
      
      Pulled By: ajkr
      
      fbshipit-source-id: 97f249fa83a9924ac34357a4bb3189c969ecb107
      d1b26507
    • T
      Enable compilation on OpenBSD · ccb76136
      Tobias Tschinkowitz 提交于
      Summary:
      I modified the Makefile so that we can compile rocksdb on OpenBSD.
      The instructions for building have been added to INSTALL.md.
      The whole compilation process works fine like this on OpenBSD-current
      Closes https://github.com/facebook/rocksdb/pull/3617
      
      Differential Revision: D7323754
      
      Pulled By: siying
      
      fbshipit-source-id: 990037d1cc69138d22f85bd77ef4dc8c1ba9edea
      ccb76136
  5. 19 3月, 2018 1 次提交
    • Y
      Fix the command used to generate ctags · 1139422d
      Yanqin Jin 提交于
      Summary:
      In original $ROCKSDB_HOME/Makefile, the command used to generate ctags is
      ```
      ctags * -R
      ```
      However, this failed to generate tags for me.
      I did some search on the usage of ctags command and found that it should be
      ```
      ctags -R .
      ```
      or
      ```
      ctags -R *
      ```
      After the change, I can find the tags in vim using `:ts <identifier>`.
      Closes https://github.com/facebook/rocksdb/pull/3626
      
      Reviewed By: ajkr
      
      Differential Revision: D7320217
      
      Pulled By: riversand963
      
      fbshipit-source-id: e4cd8f8a67842370a2343f0213df3cbd07754111
      1139422d
  6. 17 3月, 2018 3 次提交
  7. 16 3月, 2018 2 次提交
    • N
      allowing CompactFiles to return new file names · da82aab1
      Niv Dayan 提交于
      Summary:
      This is a small API extension to allow the CompactFiles method to return the names of files that were created during the compaction.
      Closes https://github.com/facebook/rocksdb/pull/3608
      
      Differential Revision: D7275789
      
      Pulled By: siying
      
      fbshipit-source-id: 1ec0c3954a0f10cd877efb5f29f9be6c7b59e9ba
      da82aab1
    • S
      Update version · cc118b0e
      Sagar Vemuri 提交于
      Summary:
      We missed updating version.h on master when cutting 5.11.fb and 5.12.fb branches. It should be the same as the version in the latest release branch (or should it be one more?).
      
      I noticed this when trying to run some upgrade/downgrade tests from 5.11 to some new code on master.
      Closes https://github.com/facebook/rocksdb/pull/3611
      
      Differential Revision: D7282917
      
      Pulled By: sagar0
      
      fbshipit-source-id: 205ee75b77c5b6bbcea95a272760b427025a4aba
      cc118b0e
  8. 15 3月, 2018 2 次提交
    • A
      Fix WAL corruption from checkpoint/backup race condition · 0cdaa1a8
      Andrew Kryczka 提交于
      Summary:
      `Writer::WriteBuffer` was always called at the beginning of checkpoint/backup. But that log writer has no internal synchronization, which meant the same buffer could be flushed twice in a race condition case, causing a WAL entry to be duplicated. Then subsequent WAL entries would be at unexpected offsets, causing the 32KB block boundaries to be overlapped and manifesting as a corruption.
      
      This PR fixes the behavior to only use `WriteBuffer` (via `FlushWAL`) in checkpoint/backup when manual WAL flush is enabled. In that case, users are responsible for providing synchronization between WAL flushes. We can also consider removing the call entirely.
      Closes https://github.com/facebook/rocksdb/pull/3603
      
      Differential Revision: D7277447
      
      Pulled By: ajkr
      
      fbshipit-source-id: 1b15bd7fd930511222b075418c10de0aaa70a35a
      0cdaa1a8
    • Y
      Blob DB: remove unreacheable code · 449627f0
      Yi Wu 提交于
      Summary:
      Fixing #3604.
      Closes https://github.com/facebook/rocksdb/pull/3606
      
      Reviewed By: siying
      
      Differential Revision: D7276604
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 915c5897b010d28956f369989e49e64785d1161f
      449627f0
  9. 14 3月, 2018 5 次提交
  10. 09 3月, 2018 6 次提交