1. 12 11月, 2015 1 次提交
    • Y
      Add OptionsUtil::LoadOptionsFromFile() API · e11f676e
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch adds OptionsUtil::LoadOptionsFromFile() and
      OptionsUtil::LoadLatestOptionsFromDB(), which allow developers
      to construct DBOptions and ColumnFamilyOptions from a RocksDB
      options file.  Note that most pointer-typed options such as
      merge_operator will not be constructed.
      
      With this API, developers no longer need to remember all the
      options in order to reopen an existing rocksdb instance like
      the following:
      
        DBOptions db_options;
        std::vector<std::string> cf_names;
        std::vector<ColumnFamilyOptions> cf_opts;
      
        // Load primitive-typed options from an existing DB
        OptionsUtil::LoadLatestOptionsFromDB(
            dbname, &db_options, &cf_names, &cf_opts);
      
        // Initialize necessary pointer-typed options
        cf_opts[0].merge_operator.reset(new MyMergeOperator());
        ...
      
        // Construct the vector of ColumnFamilyDescriptor
        std::vector<ColumnFamilyDescriptor> cf_descs;
        for (size_t i = 0; i < cf_opts.size(); ++i) {
          cf_descs.emplace_back(cf_names[i], cf_opts[i]);
        }
      
        // Open the DB
        DB* db = nullptr;
        std::vector<ColumnFamilyHandle*> cf_handles;
        auto s = DB::Open(db_options, dbname, cf_descs,
                          &handles, &db);
      
      Test Plan:
      Augment existing tests in column_family_test
      options_test
      db_test
      
      Reviewers: igor, IslamAbdelRahman, sdong, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D49095
      e11f676e
  2. 11 11月, 2015 1 次提交
    • Y
      Enable RocksDB to persist Options file. · e114f0ab
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch allows rocksdb to persist options into a file on
      DB::Open, SetOptions, and Create / Drop ColumnFamily.
      Options files are created under the same directory as the rocksdb
      instance.
      
      In addition, this patch also adds a fail_if_missing_options_file in DBOptions
      that makes any function call return non-ok status when it is not able to
      persist options properly.
      
        // If true, then DB::Open / CreateColumnFamily / DropColumnFamily
        // / SetOptions will fail if options file is not detected or properly
        // persisted.
        //
        // DEFAULT: false
        bool fail_if_missing_options_file;
      
      Options file names are formatted as OPTIONS-<number>, and RocksDB
      will always keep the latest two options files.
      
      Test Plan:
      Add options_file_test.
      
      options_test
      column_family_test
      
      Reviewers: igor, IslamAbdelRahman, sdong, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D48285
      e114f0ab
  3. 05 11月, 2015 1 次提交
  4. 04 11月, 2015 2 次提交
    • Y
      Add Memory Insight support to utilities · 7d7ee2b6
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch introduces utilities/memory, which currently includes
      GetApproximateMemoryUsageByType that reports different types of
      rocksdb memory usage given a list of input DBs.
      
      The API also take care of the case where Cache could be shared
      across multiple column families / multiple db instances.
      
      Currently, it reports memory usage of memtable, table-readers
      and cache.
      
      Test Plan: utilities/memory/memory_test.cc
      
      Reviewers: igor, anthony, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D49257
      7d7ee2b6
    • Y
      Add GetAggregatedIntProperty(): returns the aggregated value from all CFs · 3ecbab00
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch adds GetAggregatedIntProperty() that returns the aggregated
      value from all CFs
      
      Test Plan: Added a test in db_test
      
      Reviewers: igor, sdong, anthony, IslamAbdelRahman, rven
      
      Reviewed By: rven
      
      Subscribers: rven, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D49497
      3ecbab00
  5. 30 10月, 2015 1 次提交
    • I
      Clean and expose CreateLoggerFromOptions · 2872e0c8
      Islam AbdelRahman 提交于
      Summary:
      CreateLoggerFromOptions have some parameters like  db_log_dir and env, these parameters are redundant since they already exist in DBOptions
      
      this patch remove the redundant parameters and expose CreateLoggerFromOptions to users
      
      Test Plan: make check
      
      Reviewers: igor, anthony, yhchiang, rven, kradhakrishnan, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, hermanlee4
      
      Differential Revision: https://reviews.facebook.net/D49713
      2872e0c8
  6. 15 10月, 2015 1 次提交
    • S
      Remove DefaultCompactionFilterFactory. · 666fb5df
      sdong 提交于
      Summary: DefaultCompactionFilterFactory is not used anymore after recent changes. Remove it.
      
      Test Plan: Just run existing tests.
      
      Reviewers: rven, igor, yhchiang, kradhakrishnan, anthony, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D48699
      666fb5df
  7. 10 10月, 2015 1 次提交
    • S
      Pass column family ID to table property collector · 776bd8d5
      sdong 提交于
      Summary: Pass column family ID through TablePropertiesCollectorFactory::CreateTablePropertiesCollector() so that users can identify which column family this file is for and handle it differently.
      
      Test Plan: Add unit test scenarios in tests related to table properties collectors to verify the information passed in is correct.
      
      Reviewers: rven, yhchiang, anthony, kradhakrishnan, igor, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: yoshinorim, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D48411
      776bd8d5
  8. 09 10月, 2015 4 次提交
    • S
      New Manifest format to allow customized fields in NewFile. · b77eb16a
      sdong 提交于
      Summary: With this commit, we add a new format in manifest when adding a new file. Now path ID and need-compaction hint are first two customized fields.
      
      Test Plan: Add a test case in version_edit_test to verify the encoding and decoding logic. Add a unit test in db_test to verify need compaction is persistent after DB restarting.
      
      Reviewers: kradhakrishnan, anthony, IslamAbdelRahman, yhchiang, rven, igor
      
      Reviewed By: igor
      
      Subscribers: javigon, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D48123
      b77eb16a
    • S
      CompactionFilter::Context to contain column family ID · 000836a8
      sdong 提交于
      Summary: Add the column family ID to compaction filter context, so it is easier for compaction filter to apply different logic for different column families.
      
      Test Plan: Add a unit test to verify the column family ID passed is correct.
      
      Reviewers: rven, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: yoshinorim, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D48357
      000836a8
    • Y
      Change RocksDB version to 4.1 · 3a0bf873
      Yueh-Hsuan Chiang 提交于
      Summary: Change RocksDB version to 4.1
      
      Test Plan: no code change.
      
      Reviewers: sdong, anthony, IslamAbdelRahman, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D48387
      3a0bf873
    • I
      compaction_filter.h cleanup · 9803e0d8
      Igor Canadi 提交于
      Summary:
      Two changes:
      1. remove *V2 filter stuff. we deprecated that a while ago
      2. clarify what happens when user sets max_subcompactions to bigger than 1
      
      Test Plan: none
      
      Reviewers: yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47871
      9803e0d8
  9. 08 10月, 2015 1 次提交
    • I
      Compaction filter on merge operands · d80ce7f9
      Igor Canadi 提交于
      Summary:
      Since Andres' internship is over, I took over https://reviews.facebook.net/D42555 and rebased and simplified it a bit.
      
      The behavior in this diff is a bit simpler than in D42555:
      * only merge operators are passed through FilterMergeValue(). If fitler function returns true, the merge operator is ignored
      * compaction filter is *not* called on: 1) results of merge operations and 2) base values that are getting merged with merge operands (the second case was also true in previous diff)
      
      Do we also need a compaction filter to get called on merge results?
      
      Test Plan: make && make check
      
      Reviewers: lovro, tnovak, rven, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: noetzli, kolmike, leveldb, dhruba, sdong
      
      Differential Revision: https://reviews.facebook.net/D47847
      d80ce7f9
  10. 07 10月, 2015 1 次提交
    • D
      Support for LevelDB SST with .ldb suffix · 02675026
      dyniusz 提交于
      Summary:
      	Handle SST files with both ".sst" and ".ldb" suffix.
      	This enables user to migrate from leveldb to rocksdb.
      
      Test Plan:
              Added unit test with DB operating on SSTs with names schema.
              See db/dc_test.cc:SSTsWithLdbSuffixHandling for details
      
      Reviewers: yhchiang, sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D48003
      02675026
  11. 24 9月, 2015 1 次提交
    • I
      Add experimental DB::AddFile() to plug sst files into empty DB · f03b5c98
      Islam AbdelRahman 提交于
      Summary:
      This is an initial version of bulk load feature
      
      This diff allow us to create sst files, and then bulk load them later, right now the restrictions for loading an sst file are
      (1) Memtables are empty
      (2) Added sst files have sequence number = 0, and existing values in database have sequence number = 0
      (3) Added sst files values are not overlapping
      
      Test Plan: unit testing
      
      Reviewers: igor, ott, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb, ott, dhruba
      
      Differential Revision: https://reviews.facebook.net/D39081
      f03b5c98
  12. 18 9月, 2015 1 次提交
    • A
      Support for SingleDelete() · 014fd55a
      Andres Noetzli 提交于
      Summary:
      This patch fixes #7460559. It introduces SingleDelete as a new database
      operation. This operation can be used to delete keys that were never
      overwritten (no put following another put of the same key). If an overwritten
      key is single deleted the behavior is undefined. Single deletion of a
      non-existent key has no effect but multiple consecutive single deletions are
      not allowed (see limitations).
      
      In contrast to the conventional Delete() operation, the deletion entry is
      removed along with the value when the two are lined up in a compaction. Note:
      The semantics are similar to @igor's prototype that allowed to have this
      behavior on the granularity of a column family (
      https://reviews.facebook.net/D42093 ). This new patch, however, is more
      aggressive when it comes to removing tombstones: It removes the SingleDelete
      together with the value whenever there is no snapshot between them while the
      older patch only did this when the sequence number of the deletion was older
      than the earliest snapshot.
      
      Most of the complex additions are in the Compaction Iterator, all other changes
      should be relatively straightforward. The patch also includes basic support for
      single deletions in db_stress and db_bench.
      
      Limitations:
      - Not compatible with cuckoo hash tables
      - Single deletions cannot be used in combination with merges and normal
        deletions on the same key (other keys are not affected by this)
      - Consecutive single deletions are currently not allowed (and older version of
        this patch supported this so it could be resurrected if needed)
      
      Test Plan: make all check
      
      Reviewers: yhchiang, sdong, rven, anthony, yoshinorim, igor
      
      Reviewed By: igor
      
      Subscribers: maykov, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D43179
      014fd55a
  13. 10 9月, 2015 2 次提交
  14. 09 9月, 2015 1 次提交
    • A
      Added Equal method to Comparator interface · 6bdc484f
      Andres Noetzli 提交于
      Summary:
      In some cases, equality comparisons can be done more efficiently than three-way
      comparisons. There are quite a few places in the code where we only care about
      equality. This patch adds an Equal() method that defaults to using the
      Compare() method.
      
      Test Plan: make clean all check
      
      Reviewers: rven, anthony, yhchiang, igor, sdong
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46233
      6bdc484f
  15. 03 9月, 2015 1 次提交
    • I
      Remove the need for LATEST_BACKUP in BackupEngine · b42cd6be
      Igor Canadi 提交于
      Summary:
      In the first implementation of BackupEngine, LATEST_BACKUP was the commit point. The backup became committed after the write to LATEST_BACKUP completed.
      
      However, we can avoid the need for LATEST_BACKUP. Instead of write to LATEST_BACKUP, the commit point can be the rename from `meta/<backup_id>.tmp` to `meta/<backup_id>`. Once we see that there exists a file `meta/<backup_id>` (without tmp), we can assume that backup is valid.
      
      In this diff, we still write out the file LATEST_BACKUP. We need to do this so that we can maintain backward compatibility. However, the new version doesn't depend on this file anymore. We get the latest backup by `ls`-ing `meta` directory.
      
      This diff depends on D41925
      
      Test Plan: Adjusted backupable_db_test to this new behavior
      
      Reviewers: benj, yhchiang, sdong, AaronFeldman
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D42069
      b42cd6be
  16. 29 8月, 2015 1 次提交
    • S
      Add ZSTD (not final format) compression type · 7a0dbdf3
      sdong 提交于
      Summary: Add ZSTD compression type. The same way as adding LZ4.
      
      Test Plan: run all tests. Generate files in db_bench. Make sure reads succeed. But the SST files cannot be opened in older versions. Also some other adhoc tests.
      
      Reviewers: rven, anthony, IslamAbdelRahman, kradhakrishnan, igor
      
      Reviewed By: igor
      
      Subscribers: MarkCallaghan, maykov, yoshinorim, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D45747
      7a0dbdf3
  17. 26 8月, 2015 2 次提交
  18. 22 8月, 2015 1 次提交
    • A
      Changed 'num_subcompactions' to the more accurate 'max_subcompactions' · b6def58f
      Ari Ekmekji 提交于
      Summary:
      Up until this point we had DbOptions.num_subcompactions, but
      it is semantically more correct to call this max_subcompactions since
      we will schedule *up to* DbOptions.max_subcompactions smaller compactions
      at a time during a compaction job.
      
      I also added a --subcompactions option to db_bench
      
      Test Plan: make all   make check
      
      Reviewers: sdong, igor, anthony, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D45069
      b6def58f
  19. 13 8月, 2015 1 次提交
    • I
      [Cleanup] Remove RandomRWFile · 3bd9db42
      Islam AbdelRahman 提交于
      Summary: RandomRWFile is not used anywhere in out code base, this patch remove RandomRWFile
      
      Test Plan:
      make check -j64
      USE_CLANG=1 make all -j64
      OPT=-DROCKSDB_LITE make release -j64
      
      Reviewers: sdong, yhchiang, anthony, kradhakrishnan, rven, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D44091
      3bd9db42
  20. 12 8月, 2015 1 次提交
    • A
      Pessimistic Transactions · c2f2cb02
      agiardullo 提交于
      Summary:
      Initial implementation of Pessimistic Transactions.  This diff contains the api changes discussed in D38913.  This diff is pretty large, so let me know if people would prefer to meet up to discuss it.
      
      MyRocks folks:  please take a look at the API in include/rocksdb/utilities/transaction[_db].h and let me know if you have any issues.
      
      Also, you'll notice a couple of TODOs in the implementation of RollbackToSavePoint().  After chatting with Siying, I'm going to send out a separate diff for an alternate implementation of this feature that implements the rollback inside of WriteBatch/WriteBatchWithIndex.  We can then decide which route is preferable.
      
      Next, I'm planning on doing some perf testing and then integrating this diff into MongoRocks for further testing.
      
      Test Plan: Unit tests, db_bench parallel testing.
      
      Reviewers: igor, rven, sdong, yhchiang, yoshinorim
      
      Reviewed By: sdong
      
      Subscribers: hermanlee4, maykov, spetrunia, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D40869
      c2f2cb02
  21. 07 8月, 2015 1 次提交
  22. 06 8月, 2015 1 次提交
    • S
      Add Statistics.getHistogramString() to print more detailed outputs of a histogram · c7742452
      sdong 提交于
      Summary:
      Provide a way for users to know more detailed ditribution of a histogram metrics. Example outputs:
      
      Manually add statement
        fprintf(stdout, "%s\n", dbstats->getHistogramString(SST_READ_MICROS).c_str());
      Will print out something like:
      
      Count: 989151  Average: 1.7659  StdDev: 1.52
      Min: 0.0000  Median: 1.2071  Max: 860.0000
      Percentiles: P50: 1.21 P75: 1.70 P99: 5.12 P99.9: 13.67 P99.99: 21.70
      ------------------------------------------------------
      [       0,       1 )   390839  39.513%  39.513% ########
      [       1,       2 )   500918  50.641%  90.154% ##########
      [       2,       3 )    79358   8.023%  98.177% ##
      [       3,       4 )     6297   0.637%  98.813%
      [       4,       5 )     1712   0.173%  98.986%
      [       5,       6 )     1134   0.115%  99.101%
      [       6,       7 )     1222   0.124%  99.224%
      [       7,       8 )     1529   0.155%  99.379%
      [       8,       9 )     1264   0.128%  99.507%
      [       9,      10 )      988   0.100%  99.607%
      [      10,      12 )     1378   0.139%  99.746%
      [      12,      14 )     1828   0.185%  99.931%
      [      14,      16 )      410   0.041%  99.972%
      [      16,      18 )       72   0.007%  99.980%
      [      18,      20 )       67   0.007%  99.986%
      [      20,      25 )      106   0.011%  99.997%
      [      25,      30 )       24   0.002%  99.999%
      [      30,      35 )        1   0.000% 100.000%
      [     250,     300 )        2   0.000% 100.000%
      [     300,     350 )        1   0.000% 100.000%
      [     800,     900 )        1   0.000% 100.000%
      
      Test Plan: Manually add a print in db_bench and make sure it prints out as expected. Will add some codes to cover the function
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D43611
      c7742452
  23. 05 8月, 2015 5 次提交
    • M
      [wal changes 3/3] method in DB to sync WAL without blocking writers · e06cf1a0
      Mike Kolupaev 提交于
      Summary:
      Subj. We really need this feature.
      
      Previous diff D40899 has most of the changes to make this possible, this diff just adds the method.
      
      Test Plan: `make check`, the new test fails without this diff; ran with ASAN, TSAN and valgrind.
      
      Reviewers: igor, rven, IslamAbdelRahman, anthony, kradhakrishnan, tnovak, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: MarkCallaghan, maykov, hermanlee4, yoshinorim, tnovak, dhruba
      
      Differential Revision: https://reviews.facebook.net/D40905
      e06cf1a0
    • I
      Support delete rate limiting · c45a57b4
      Islam AbdelRahman 提交于
      Summary:
      Introduce DeleteScheduler that allow enforcing a rate limit on file deletion
      Instead of deleting files immediately, files are moved to trash directory and deleted in a background thread that apply sleep penalty between deletes if needed.
      
      I have updated PurgeObsoleteFiles and PurgeObsoleteWALFiles to use the delete_scheduler instead of env_->DeleteFile
      
      Test Plan:
      added delete_scheduler_test
      existing unit tests
      
      Reviewers: kradhakrishnan, anthony, rven, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D43221
      c45a57b4
    • Y
      Polish HISTORY.md · 3424eeb1
      Yueh-Hsuan Chiang 提交于
      Summary: Polish HISTORY.md
      
      Test Plan: no code change.
      
      Reviewers: igor, anthony, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D43527
      3424eeb1
    • Y
      Fix a typo and update HISTORY.md for NewCompactOnDeletionCollectorFactory(). · 24daff6d
      Yueh-Hsuan Chiang 提交于
      Summary: Fix a typo and update HISTORY.md for NewCompactOnDeletionCollectorFactory().
      
      Test Plan: no code change.
      
      Reviewers: igor, anthony, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D43521
      24daff6d
    • Y
      Add DBOptions::skip_sats_update_on_db_open · 14d0bfa4
      Yueh-Hsuan Chiang 提交于
      Summary:
      UpdateAccumulatedStats() is used to optimize compaction decision
      esp. when the number of deletion entries are high, but this function
      can slowdown DBOpen esp. in disk environment.
      
      This patch adds DBOptions::skip_sats_update_on_db_open, which skips
      UpdateAccumulatedStats() in DB::Open() time when it's set to true.
      
      Test Plan: Add DBCompactionTest.SkipStatsUpdateTest
      
      Reviewers: igor, anthony, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: tnovak, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D42843
      14d0bfa4
  24. 30 7月, 2015 1 次提交
    • A
      WriteBatch Save Points · 8161bdb5
      agiardullo 提交于
      Summary:
      Support RollbackToSavePoint() in WriteBatch and WriteBatchWithIndex.  Support for partial transaction rollback is needed for MyRocks.
      
      An alternate implementation of Transaction::RollbackToSavePoint() exists in D40869.  However, the other implementation is messier because it is implemented outside of WriteBatch.  This implementation is much cleaner and also exposes a potentially useful feature to WriteBatch.
      
      Test Plan: Added unit tests
      
      Reviewers: IslamAbdelRahman, kradhakrishnan, maykov, yoshinorim, hermanlee4, spetrunia, sdong, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D42723
      8161bdb5
  25. 21 7月, 2015 1 次提交
    • A
      Improved FileExists API · 06429408
      agiardullo 提交于
      Summary: Add new CheckFileExists method.  Considered changing the FileExists api but didn't want to break anyone's builds.
      
      Test Plan: unit tests
      
      Reviewers: yhchiang, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D42003
      06429408
  26. 18 7月, 2015 1 次提交
    • I
      Deprecate CompactionFilterV2 · a96fcd09
      Igor Canadi 提交于
      Summary: It has been around for a while and it looks like it never found any uses in the wild. It's also complicating our compaction_job code quite a bit. We're deprecating it in 3.13, but will put it back in 3.14 if we actually find users that need this feature.
      
      Test Plan: make check
      
      Reviewers: noetzli, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D42405
      a96fcd09
  27. 15 7月, 2015 1 次提交
    • I
      Better error handling in BackupEngine · 8a9fca26
      Igor Canadi 提交于
      Summary:
      Couple of changes here:
      * NewBackupEngine() and NewReadOnlyBackupEngine() are now removed. They were deprecated since RocksDB 3.8. Changing these to new functions should be pretty straight-forward. As a followup, I'll fix all fbcode callsights
      * Instead of initializing backup engine in the constructor, we initialize it in a separate function now. That way, we can catch all errors and return appropriate status code.
      * We catch all errors during initializations and return them to the client properly.
      * Added new tests to backupable_db_test, to make sure that we can't open BackupEngine when there are Env errors.
      * Transitioned backupable_db_test to use BackupEngine rather than BackupableDB. From the two available APIs, judging by the current use-cases, it looks like BackupEngine API won. It's much more flexible since it doesn't require StackableDB.
      
      Test Plan: Added a new unit test to backupable_db_test
      
      Reviewers: yhchiang, sdong, AaronFeldman
      
      Reviewed By: AaronFeldman
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D41925
      8a9fca26
  28. 14 7月, 2015 2 次提交
    • I
      Deprecate purge_redundant_kvs_while_flush · a9c51095
      Igor Canadi 提交于
      Summary: This option is guarding the feature implemented 2 and a half years ago: D8991. The feature was enabled by default back then and has been running without issues. There is no reason why any client would turn this feature off. I found no reference in fbcode.
      
      Test Plan: none
      
      Reviewers: sdong, yhchiang, anthony, dhruba
      
      Reviewed By: dhruba
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D42063
      a9c51095
    • I
      Deprecate WriteOptions::timeout_hint_us · 5aea98dd
      Igor Canadi 提交于
      Summary:
      In one of our recent meetings, we discussed deprecating features that are not being actively used. One of those features, at least within Facebook, is timeout_hint. The feature is really nicely implemented, but if nobody needs it, we should remove it from our code-base (until we get a valid use-case). Some arguments:
      * Less code == better icache hit rate, smaller builds, simpler code
      * The motivation for adding timeout_hint_us was to work-around RocksDB's stall issue. However, we're currently addressing the stall issue itself (see @sdong's recent work on stall write_rate), so we should never see sharp lock-ups in the future.
      * Nobody is using the feature within Facebook's code-base. Googling for `timeout_hint_us` also doesn't yield any users.
      
      Test Plan: make check
      
      Reviewers: anthony, kradhakrishnan, sdong, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: sdong, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D41937
      5aea98dd
  29. 08 7月, 2015 1 次提交