1. 12 5月, 2015 1 次提交
    • A
      API to fetch from both a WriteBatchWithIndex and the db · 711465cc
      agiardullo 提交于
      Summary:
      Added a couple functions to WriteBatchWithIndex to make it easier to query the value of a key including reading pending writes from a batch.  (This is needed for transactions).
      
      I created write_batch_with_index_internal.h to use to store an internal-only helper function since there wasn't a good place in the existing class hierarchy to store this function (and it didn't seem right to stick this function inside WriteBatchInternal::Rep).
      
      Since I needed to access the WriteBatchEntryComparator, I moved some helper classes from write_batch_with_index.cc into write_batch_with_index_internal.h/.cc.  WriteBatchIndexEntry, ReadableWriteBatch, and WriteBatchEntryComparator are all unchanged (just moved to a different file(s)).
      
      Test Plan: Added new unit tests.
      
      Reviewers: rven, yhchiang, sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38037
      711465cc
  2. 10 5月, 2015 1 次提交
  3. 09 5月, 2015 2 次提交
  4. 08 5月, 2015 3 次提交
    • I
      rm -rf in make clean · beda81c5
      Igor Canadi 提交于
      Summary: Without this I get bunch of questions when I run `make clean`
      
      Test Plan: no more questions!
      
      Reviewers: rven, yhchiang, meyering, anthony
      
      Reviewed By: meyering, anthony
      
      Subscribers: meyering, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38145
      beda81c5
    • I
      Fix BackupEngine · 50eab9cf
      Igor Canadi 提交于
      Summary:
      In D28521 we removed GarbageCollect() from BackupEngine's constructor. The reason was that opening BackupEngine on HDFS was very slow and in most cases we didn't have any garbage. We allowed the user to call GarbageCollect() when it detects some garbage files in his backup directory.
      
      Unfortunately, this left us vulnerable to an interesting issue. Let's say we started a backup and copied files {1, 3} but the backup failed. On another host, we restore DB from backup and generate {1, 3, 5}. Since {1, 3} is already there, we will not overwrite. However, these files might be from a different database so their contents might be different. See internal task t6781803 for more info.
      
      Now, when we're copying files and we discover a file already there, we check:
      1. if the file is not referenced from any backups, we overwrite the file.
      2. if the file is referenced from other backups AND the checksums don't match, we fail the backup. This will only happen if user is using a single backup directory for backing up two different databases.
      3. if the file is referenced from other backups AND the checksums match, it's all good. We skip the copy and go copy the next file.
      
      Test Plan: Added new test to backupable_db_test. The test fails before this patch.
      
      Reviewers: sdong, rven, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D37599
      50eab9cf
    • I
      Bump to 3.11 · 962f8ba3
      Igor Canadi 提交于
      Summary: as title
      
      Test Plan: none
      
      Reviewers: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38175
      962f8ba3
  5. 07 5月, 2015 2 次提交
    • J
      Merge pull request #601 from adamretter/jdb-bench · 37bbd318
      Jörg Maier 提交于
      Small fixes to Java benchmark
      37bbd318
    • Y
      Allow GetThreadList() to report basic compaction operation properties. · 77a5a543
      Yueh-Hsuan Chiang 提交于
      Summary:
      Now we're able to show more details about a compaction in
      GetThreadList() :)
      
      This patch allows GetThreadList() to report basic compaction
      operation properties.  Basic compaction properties include:
          1. job id
          2. compaction input / output level
          3. compaction property flags (is_manual, is_deletion, .. etc)
          4. total input bytes
          5. the number of bytes has been read currently.
          6. the number of bytes has been written currently.
      
      Flush operation properties will be done in a seperate diff.
      
      Test Plan:
      /db_bench --threads=30 --num=1000000 --benchmarks=fillrandom --thread_status_per_interval=1
      
      Sample output of tracking same job:
      
                ThreadID ThreadType       cfName            Operation   ElapsedTime                                         Stage        State OperationProperties
         140664171987072    Low Pri      default           Compaction     31.357 ms     CompactionJob::FinishCompactionOutputFile              BaseInputLevel 1 | BytesRead 2264663 | BytesWritten 1934241 | IsDeletion 0 | IsManual 0 | IsTrivialMove 0 | JobID 277 | OutputLevel 2 | TotalInputBytes 3964158 |
      
                ThreadID ThreadType       cfName            Operation   ElapsedTime                                         Stage        State OperationProperties
         140664171987072    Low Pri      default           Compaction     59.440 ms     CompactionJob::FinishCompactionOutputFile              BaseInputLevel 1 | BytesRead 2264663 | BytesWritten 1934241 | IsDeletion 0 | IsManual 0 | IsTrivialMove 0 | JobID 277 | OutputLevel 2 | TotalInputBytes 3964158 |
      
                ThreadID ThreadType       cfName            Operation   ElapsedTime                                         Stage        State OperationProperties
         140664171987072    Low Pri      default           Compaction    226.375 ms                        CompactionJob::Install              BaseInputLevel 1 | BytesRead 3958013 | BytesWritten 3621940 | IsDeletion 0 | IsManual 0 | IsTrivialMove 0 | JobID 277 | OutputLevel 2 | TotalInputBytes 3964158 |
      
      Reviewers: sdong, rven, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D37653
      77a5a543
  6. 06 5月, 2015 5 次提交
    • I
      Cleanup CompactionJob · 65fe1cfb
      Igor Canadi 提交于
      Summary:
      Couple changes:
      1. instead of SnapshotList, just take a vector of snapshots
      2. don't take a separate parameter is_snapshots_supported. If there are snapshots in the list, that means they are supported. I actually think we should get rid of this notion of snapshots not being supported.
      3. don't pass in mutable_cf_options as a parameter. Lifetime of mutable_cf_options is a bit tricky to maintain, so it's better to not pass it in for the whole compaction job. We only really need it when we install the compaction results.
      
      Test Plan: make check
      
      Reviewers: sdong, rven, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D36627
      65fe1cfb
    • L
      fix crashes in stats and compaction filter for db_ttl_impl · df4130ad
      Laurent Demailly 提交于
      Summary: fix crashes in stats and compaction filter for db_ttl_impl
      
      Test Plan:
      Ran build with lots of debugging
      https://reviews.facebook.net/differential/diff/194175/
      
      Reviewers: yhchiang, igor, rven
      
      Reviewed By: igor
      
      Subscribers: rven, dhruba
      
      Differential Revision: https://reviews.facebook.net/D38001
      df4130ad
    • V
      Fix flakiness in column_family_test · 7ea76948
      Venkatesh Radhakrishnan 提交于
      Summary:
      Fixes #6840824, running "make check" on centos6 hits
      a deadlock in column_family_test
      
      Test Plan:
      seq 10000 | parallel --gnu --eta 't=/dev/shm/rdb-{}; rm -rf
      $t; mkdir $t && export TEST_TMPDIR=$t; ./column_family_test > $t/log-{}'
      Made the test deterministic by narrrowing the window for the flush.
      
      Reviewers: igor, meyering
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38079
      7ea76948
    • I
      Don't treat warnings as error when building release · a2c4cc75
      Igor Canadi 提交于
      Summary: This will reduce errors reported by open source by 90%. Developers should have warnings break their compile. Users shouldn't.
      
      Test Plan:
      make dbg:
      g++  -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wno-unused-parameter -Werror -I. -I./include -std=c++11  -DROCKSDB_PLATFORM_POSIX  -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=gflags -DZLIB -DBZIP2 -march=native   -isystem ./third-party/gtest-1.7.0/fused-src  -Woverloaded-virtual -Wn
      on-virtual-dtor -Wno-missing-field-initializers -c db/repair.cc -o db/repair.o
      
      make all:
      g++  -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wno-unused-parameter -Werror -I. -I./include -std=c++11  -DROCKSDB_PLATFORM_POSIX  -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=gflags -DZLIB -DBZIP2 -march=native   -isystem ./third-party/gtest-1.7.0/fused-src -O2 -fno-omit-frame-pointer -momit-leaf-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/repair.cc -o db/repair.o
      
      make static_lib:
      g++  -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wno-unused-parameter -I. -I./include -std=c++11  -DROCKSDB_PLATFORM_POSIX  -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=gflags -DZLIB -DBZIP2 -march=native   -isystem ./third-party/gtest-1.7.0/fused-src -O2 -fno-omit-frame-pointer -momit-leaf-frame-pointer -DNDEBUG -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/repair.cc -o db/repair.o
      
      Reviewers: sdong, yhchiang, rven
      
      Reviewed By: rven
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38031
      a2c4cc75
    • L
      Optimize GetRange Function · 9aa011fa
      Liangjun Feng 提交于
      Summary: Optimize GetRange Function by checking the level of the files
      
      Test Plan: pass make all check
      
      Reviewers: rven, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D37977
      9aa011fa
  7. 05 5月, 2015 2 次提交
  8. 03 5月, 2015 1 次提交
    • J
      build: avoid unused-variable warning · 2ab7065a
      Jim Meyering 提交于
      Summary:
      [noticed a new warning when building with the very latest gcc]
      * db/memtablerep_bench.cc (FLAGS_env): Remove declaration
      of unused varaible, to avoid this warning/error:
      
      db/memtablerep_bench.cc:135:22: error: ‘FLAGS_env’ defined but not\
        used [-Werror=unused-variable]
       static rocksdb::Env* FLAGS_env = rocksdb::Env::Default();
                            ^
      
      Test Plan: compile
      
      Reviewers: ljin, rven, igor.sugak, yhchiang, sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D37983
      2ab7065a
  9. 02 5月, 2015 3 次提交
  10. 01 5月, 2015 5 次提交
  11. 30 4月, 2015 2 次提交
  12. 29 4月, 2015 1 次提交
  13. 28 4月, 2015 3 次提交
    • A
      Helper function to time Merges · d6f39c5a
      agiardullo 提交于
      Summary: Remove duplicate code.  If this diff looks good, I will cleanup other call sites as well.
      
      Test Plan: unit tests
      
      Reviewers: rven, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D37761
      d6f39c5a
    • M
      Add scripts to run leveldb benchmark · a087f80e
      Mark Callaghan 提交于
      Summary:
      This runs a benchmark for LevelDB similar to what we have
      in tools/run_flash_bench.sh. It requires changes to db_bench that I published
      in a LevelDB fork on github.  Some results are at:
      http://smalldatum.blogspot.com/2015/04/comparing-leveldb-and-rocksdb-take-2.html
      
      Sample output:
      ops/sec	mb/sec	usec/op	avg	p50	Test
      525	16.4	1904.5	1904.5	111.0	fillseq.v32768
      75187	15.5	13.3	13.3	4.4	fillseq.v200
      28328	5.8	35.3	35.3	4.7	overwrite.t1.s0
      175438	0.0	5.7	5.7	4.4	readrandom.t1
      28490	5.9	35.1	35.1	4.7	overwrite.t1.s0
      121951	0.0	8.2	8.2	5.7	readwhilewriting.t1
      
      Task ID: #
      
      Blame Rev:
      
      Test Plan:
      Revert Plan:
      
      Database Impact:
      
      Memcache Impact:
      
      Other Notes:
      
      EImportant:
      
      - begin *PUBLIC* platform impact section -
      Bugzilla: #
      - end platform impact -
      
      Reviewers: igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D37749
      a087f80e
    • I
      Include bunch of more events into EventLogger · 1bb4928d
      Igor Canadi 提交于
      Summary:
      Added these events:
      * Recovery start, finish and also when recovery creates a file
      * Trivial move
      * Compaction start, finish and when compaction creates a file
      * Flush start, finish
      
      Also includes small fix to EventLogger
      
      Also added option ROCKSDB_PRINT_EVENTS_TO_STDOUT which is useful when we debug things. I've spent far too much time chasing LOG files.
      
      Still didn't get sst table properties in JSON. They are written very deeply into the stack. I'll address in separate diff.
      
      TODO:
      * Write specification. Let's first use this for a while and figure out what's good data to put here, too. After that we'll write spec
      * Write tools that parse and analyze LOGs. This can be in python or go. Good intern task.
      
      Test Plan: Ran db_bench with ROCKSDB_PRINT_EVENTS_TO_STDOUT. Here's the output: https://phabricator.fb.com/P19811976
      
      Reviewers: sdong, yhchiang, rven, MarkCallaghan, kradhakrishnan, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D37521
      1bb4928d
  14. 27 4月, 2015 1 次提交
  15. 26 4月, 2015 2 次提交
  16. 25 4月, 2015 4 次提交
  17. 24 4月, 2015 2 次提交
    • S
      Build for CYGWIN · 98a44559
      sdong 提交于
      Summary:
      Make it build for CYGWIN.
      Need to define "-std=gnu++11" instead of "-std=c++11" and use some replacement functions.
      
      Test Plan: Build it and run some unit tests in CYGWIN
      
      Reviewers: yhchiang, rven, anthony, kradhakrishnan, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D37605
      98a44559
    • S
      Fix CompactRange for universal compaction with num_levels > 1 · d01bbb53
      sdong 提交于
      Summary:
      CompactRange for universal compaction with num_levels > 1 seems to have a bug. The unit test also has a bug so it doesn't capture the problem.
      Fix it. Revert the compact range to the logic equivalent to num_levels=1. Always compact all files together.
      
      It should also fix DBTest.IncreaseUniversalCompactionNumLevels. The issue was that options.write_buffer_size = 100 << 10 and options.write_buffer_size = 100 << 10 are not used in later test scenarios. So write_buffer_size of 4MB was used. The compaction trigger condition is not anymore obvious as expected.
      
      Test Plan: Run the new test and all test suites
      
      Reviewers: yhchiang, rven, kradhakrishnan, anthony, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D37551
      d01bbb53