1. 21 11月, 2015 1 次提交
  2. 18 11月, 2015 1 次提交
    • S
      DBTest.MergeTestTime to only use fake time to be determinstic · d5540e18
      sdong 提交于
      Summary: DBTest.MergeTestTime is a test verifying timing counters. Depending on real time may cause non-determinstic results. Change to fake time to be determinsitic.
      
      Test Plan: Run the test and make sure it passes
      
      Reviewers: yhchiang, anthony, rven, kradhakrishnan, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D50883
      d5540e18
  3. 17 11月, 2015 1 次提交
  4. 04 11月, 2015 1 次提交
  5. 31 10月, 2015 2 次提交
  6. 30 10月, 2015 1 次提交
  7. 27 10月, 2015 1 次提交
  8. 23 10月, 2015 1 次提交
  9. 20 10月, 2015 3 次提交
  10. 19 10月, 2015 1 次提交
  11. 18 10月, 2015 1 次提交
  12. 17 10月, 2015 2 次提交
  13. 16 10月, 2015 1 次提交
  14. 15 10月, 2015 1 次提交
    • S
      Make DBTest.ReadLatencyHistogramByLevel more robust · dae49e82
      sdong 提交于
      Summary:
      Two fixes:
      1. Wait compaction after generating each L0 file so that we are sure there are one L0 file left.
      2. https://reviews.facebook.net/D48423 increased from 500 keys to 700 keys but in verification phase we are still querying the first 500 keys. It is a bug to fix.
      
      Test Plan: Run the test in the same environment that fails by chance of one in tens of times. It doesn't fail after 1000 times.
      
      Reviewers: yhchiang, IslamAbdelRahman, igor, rven, kradhakrishnan
      
      Reviewed By: rven, kradhakrishnan
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D48759
      dae49e82
  15. 14 10月, 2015 2 次提交
    • S
      Seperate InternalIterator from Iterator · 35ad531b
      sdong 提交于
      Summary:
      Separate a new class InternalIterator from class Iterator, when the look-up is done internally, which also means they operate on key with sequence ID and type.
      
      This change will enable potential future optimizations but for now InternalIterator's functions are still the same as Iterator's.
      At the same time, separate the cleanup function to a separate class and let both of InternalIterator and Iterator inherit from it.
      
      Test Plan: Run all existing tests.
      
      Reviewers: igor, yhchiang, anthony, kradhakrishnan, IslamAbdelRahman, rven
      
      Reviewed By: rven
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D48549
      35ad531b
    • P
      Put wal_filter under #ifndef ROCKSDB_LITE · cc4d13e0
      Praveen Rao 提交于
      cc4d13e0
  16. 13 10月, 2015 4 次提交
  17. 10 10月, 2015 2 次提交
    • 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
    • S
      Make DBTest.AggregatedTableProperties more deterministic · e61d9c14
      sdong 提交于
      Summary: Now based on environment, DBTest.AggregatedTableProperties has a possibility of issuing a L0->L1 compaction after reopening and the results are not what we expected. We tune the L0 compaction trigger to make it less likely to happen.
      
      Test Plan: I can't repro the failure but I think the change is better. Just run the test and make sure it passes.
      
      Reviewers: kradhakrishnan, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D48423
      e61d9c14
  18. 09 10月, 2015 1 次提交
    • 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
  19. 08 10月, 2015 1 次提交
    • D
      bloom hit/miss stats for SST and memtable · a065cdb3
      dyniusz 提交于
      Summary:
      	hit and miss bloom filter stats for memtable and SST
      	stats added to perf_context struct
      	key matches and prefix matches combined into one stat
      
      Test Plan: unit test veryfing the functionality added, see BloomStatsTest in db_test.cc for details
      
      Reviewers: yhchiang, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47859
      a065cdb3
  20. 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
  21. 06 10月, 2015 1 次提交
  22. 03 10月, 2015 1 次提交
  23. 26 9月, 2015 3 次提交
  24. 24 9月, 2015 2 次提交
    • 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
    • S
      PlainTableReader to support non-mmap mode · df34aea3
      sdong 提交于
      Summary:
      PlainTableReader now only allows mmap-mode. Add the support to non-mmap mode for more flexibility.
      Refactor the codes to move all logic of reading data to PlainTableKeyDecoder, and consolidate the calls to Read() call and ReadVarint32() call. Implement the calls for both of mmap and non-mmap case seperately. For non-mmap mode, make copy of keys in several places when we need to move the buffer after reading the keys.
      
      Test Plan: Add the mode of non-mmap case in plain_table_db_test. Run it in valgrind mode too.
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D47187
      df34aea3
  25. 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
  26. 16 9月, 2015 3 次提交
    • I
      Merge issue with D46773 · 0e50a3fc
      Igor Canadi 提交于
      Summary: There was a merge issue with SleepingBackgroundTask
      
      Test Plan: compiles now
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46977
      0e50a3fc
    • I
      LogAndApply() should fail if the column family has been dropped · a7e80379
      Igor Canadi 提交于
      Summary:
      This patch finally fixes the ColumnFamilyTest.ReadDroppedColumnFamily test. The test has been failing very sporadically and it was hard to repro. However, I managed to write a new tests that reproes the failure deterministically.
      
      Here's what happens:
      1. We start the flush for the column family
      2. We check if the column family was dropped here: https://github.com/facebook/rocksdb/blob/a3fc49bfddcdb1ff29409aacd06c04df56c7a1d7/db/flush_job.cc#L149
      3. This check goes through, ends up in InstallMemtableFlushResults() and it goes into LogAndApply()
      4. At about this time, we start dropping the column family. Dropping the column family process gets to LogAndApply() at about the same time as LogAndApply() from flush process
      5. Drop column family goes through LogAndApply() first, marking the column family as dropped.
      6. Flush process gets woken up and gets a chance to write to the MANIFEST. However, this is where it gets stuck: https://github.com/facebook/rocksdb/blob/a3fc49bfddcdb1ff29409aacd06c04df56c7a1d7/db/version_set.cc#L1975
      7. We see that the column family was dropped, so there is no need to write to the MANIFEST. We return OK.
      8. Flush gets OK back from LogAndApply() and it deletes the memtable, thinking that the data is now safely persisted to sst file.
      
      The fix is pretty simple. Instead of OK, we return ShutdownInProgress. This is not really true, but we have been using this status code to also mean "this operation was canceled because the column family has been dropped".
      
      The fix is only one LOC. All other code is related to tests. I added a new test that reproes the failure. I also moved SleepingBackgroundTask to util/testutil.h (because I needed it in column_family_test for my new test). There's plenty of other places where we reimplement SleepingBackgroundTask, but I'll address that in a separate commit.
      
      Test Plan:
      1. new test
      2. make check
      3. Make sure the ColumnFamilyTest.ReadDroppedColumnFamily doesn't fail on Travis: https://travis-ci.org/facebook/rocksdb/jobs/79952386
      
      Reviewers: yhchiang, anthony, IslamAbdelRahman, kradhakrishnan, rven, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46773
      a7e80379
    • Y
      Adding Slice::difference_offset() function · 48860731
      Yoshinori Matsunobu 提交于
      Summary:
      There are some use cases in MyRocks to compare two slices
      and to return the first byte where they differ. It may be
      useful to add it as a RocksDB Slice function.
      
      Test Plan: db_test
      
      Reviewers: sdong, rven, igor
      
      Reviewed By: igor
      
      Subscribers: jkedgar, dhruba
      
      Differential Revision: https://reviews.facebook.net/D46935
      48860731