5aad881 | sdong | 13 May 2015, 22:26:02 UTC | DBTest.DynamicLevelMaxBytesBase2: remove an unnecesary check Summary: DBTest.DynamicLevelMaxBytesBase2 has a check that is not necessary and may fail. Remove it, and add two unrelated check. Test Plan: Run the test Reviewers: yhchiang, rven, kradhakrishnan, anthony, igor Reviewed By: igor Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D38457 | 14 May 2015, 16:22:43 UTC |
ec43a8b | sdong | 13 May 2015, 17:29:49 UTC | Universal Compaction with multiple levels won't allocate up to output size Summary: Universal compactions with multiple levels should use file preallocation size based on file size if output level is not level 0 Test Plan: Run all tests. Reviewers: igor Reviewed By: igor Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D38439 | 13 May 2015, 21:15:46 UTC |
714fcc0 | Yueh-Hsuan Chiang | 13 May 2015, 19:26:07 UTC | Make ThreadStatus::InterpretOperationProperties take const uint64_t* Summary: Make ThreadStatus::InterpretOperationProperties take const uint64_t* Test Plan: make make OPT=-DROCKSDB_LITE shared_lib Reviewers: igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D38445 | 13 May 2015, 19:26:07 UTC |
bc68bd5 | sdong | 13 May 2015, 00:40:27 UTC | db_bench to support rate limiter Summary: Add --rate_limiter_bytes_per_sec to db_bench to allow rater limit to disk Test Plan: Run ./db_bench --benchmarks=fillseq --num=30000000 --rate_limiter_bytes_per_sec=3000000 --num_multi_db=8 -disable_wal And see io_stats to have the rate limited. Reviewers: yhchiang, rven, anthony, kradhakrishnan, igor Reviewed By: igor Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D38385 | 13 May 2015, 17:03:41 UTC |
df1f87a | Yueh-Hsuan Chiang | 12 May 2015, 23:18:58 UTC | Fixed compile error in db/column_family.cc Summary: Fixed the following compile error in db/column_family.cc db/column_family.cc:633:33: error: ‘ASSERT_GT’ was not declared in this scope 16:14:45 ASSERT_GT(listeners.size(), 0U); Test Plan: make db_test Reviewers: igor, sdong, rven Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D38367 | 12 May 2015, 23:20:03 UTC |
14431e9 | Yueh-Hsuan Chiang | 12 May 2015, 23:10:23 UTC | Fixed a bug in EventListener::OnCompactionCompleted(). Summary: Fixed a bug in EventListener::OnCompactionCompleted() that returns incorrect list of input / output file names. Test Plan: Extend existing test in listener_test.cc Reviewers: sdong, rven, igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D38349 | 12 May 2015, 23:10:23 UTC |
dbd95b7 | Igor Canadi | 12 May 2015, 22:53:55 UTC | Add more table properties to EventLogger Summary: Example output: {"time_micros": 1431463794310521, "job": 353, "event": "table_file_creation", "file_number": 387, "file_size": 86937, "table_info": {"data_size": "81801", "index_size": "9751", "filter_size": "0", "raw_key_size": "23448", "raw_average_key_size": "24.000000", "raw_value_size": "990571", "raw_average_value_size": "1013.890481", "num_data_blocks": "245", "num_entries": "977", "filter_policy_name": "", "kDeletedKeys": "0"}} Also fixed a bug where BuildTable() in recovery was passing Env::IOHigh argument into paranoid_checks_file parameter. Test Plan: make check + check out the output in the log Reviewers: sdong, rven, yhchiang Reviewed By: yhchiang Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D38343 | 12 May 2015, 22:53:55 UTC |
b588176 | Igor Canadi | 12 May 2015, 18:16:25 UTC | Reset parent_index and base_index when picking files marked for compaction Summary: This caused a crash of our MongoDB + RocksDB instance. PickCompactionBySize() sets its own parent_index. We never reset this parent_index when picking PickFilesMarkedForCompactionExperimental(). So we might end up doing SetupOtherInputs() with parent_index that was set by PickCompactionBySize, although we're using compaction calculated using PickFilesMarkedForCompactionExperimental. Test Plan: Added a unit test that fails with assertion on master. Reviewers: yhchiang, rven, sdong Reviewed By: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D38337 | 12 May 2015, 18:16:25 UTC |
711465c | agiardullo | 11 May 2015, 21:51:51 UTC | API to fetch from both a WriteBatchWithIndex and the db 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 | 11 May 2015, 21:51:51 UTC |
3996fff | Igor Canadi | 09 May 2015, 18:03:36 UTC | Fix clang build - add override Summary: In new clang we need to add override to every overriden function Test Plan: none Reviewers: rven Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D38259 | 09 May 2015, 18:04:14 UTC |
d978139 | Igor Canadi | 09 May 2015, 02:37:02 UTC | SuggestCompactRange() is manual compaction Summary: When reporting compaction that was started because of SuggestCompactRange() we should treat it as manual compaction. Test Plan: none Reviewers: yhchiang, rven Reviewed By: rven Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D38139 | 09 May 2015, 02:37:02 UTC |
2fe24e4 | Yueh-Hsuan Chiang | 08 May 2015, 18:02:47 UTC | Don't treat warnings as error when building rocksdbjavastatic Summary: Don't treat warnings as error when building rocksdbjavastatic Test Plan: make rocksdbjavastatic -j32 Reviewers: rven, fyrz, adamretter, igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D38187 | 08 May 2015, 18:02:47 UTC |
beda81c | Igor Canadi | 08 May 2015, 00:47:19 UTC | rm -rf in make clean 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 | 08 May 2015, 00:47:19 UTC |
50eab9c | Igor Canadi | 08 May 2015, 00:39:19 UTC | Fix BackupEngine 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 | 08 May 2015, 00:39:19 UTC |
962f8ba | Igor Canadi | 07 May 2015, 20:26:18 UTC | Bump to 3.11 Summary: as title Test Plan: none Reviewers: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D38175 | 07 May 2015, 20:27:14 UTC |
37bbd31 | Jörg Maier | 07 May 2015, 06:14:47 UTC | Merge pull request #601 from adamretter/jdb-bench Small fixes to Java benchmark | 07 May 2015, 06:14:47 UTC |
77a5a54 | Yueh-Hsuan Chiang | 07 May 2015, 05:50:35 UTC | Allow GetThreadList() to report basic compaction operation properties. 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 | 07 May 2015, 05:51:06 UTC |
65fe1cf | Igor Canadi | 06 May 2015, 02:01:12 UTC | Cleanup CompactionJob 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 | 06 May 2015, 02:01:12 UTC |
df4130a | Laurent Demailly | 05 May 2015, 23:54:47 UTC | fix crashes in stats and compaction filter for db_ttl_impl 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 | 05 May 2015, 23:54:47 UTC |
7ea7694 | Venkatesh Radhakrishnan | 05 May 2015, 22:59:02 UTC | Fix flakiness in column_family_test 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 | 05 May 2015, 22:59:02 UTC |
a2c4cc7 | Igor Canadi | 05 May 2015, 18:54:13 UTC | Don't treat warnings as error when building release 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 | 05 May 2015, 18:54:13 UTC |
9aa011f | Liangjun Feng | 05 May 2015, 16:57:47 UTC | Optimize GetRange Function 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 | 05 May 2015, 16:57:47 UTC |
36a7408 | Igor Canadi | 05 May 2015, 15:57:34 UTC | Fix UNLIKELY parenthesis Summary: Ooops :) status.ok() is acutally highly likely :) Test Plan: none Reviewers: rven, yhchiang, anthony Reviewed By: anthony Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D38043 | 05 May 2015, 15:57:34 UTC |
9bdbaab | Igor Canadi | 04 May 2015, 22:27:59 UTC | Update USERS.md Fix formatting | 04 May 2015, 22:27:59 UTC |
2ab7065 | Jim Meyering | 02 May 2015, 20:19:10 UTC | build: avoid unused-variable warning 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 | 02 May 2015, 20:19:10 UTC |
8804434 | Mark Callaghan | 02 May 2015, 14:46:12 UTC | Add Size-GB column to benchmark reports Summary: See https://gist.github.com/mdcallag/b867ee051d765760be0d for a sample 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/D37971 | 02 May 2015, 14:46:12 UTC |
d2346c2 | Venkatesh Radhakrishnan | 01 May 2015, 22:41:50 UTC | Fix hang with large write batches and column families. Summary: This diff fixes a hang reported by a Github user. https://www.facebook.com/l.php?u=https%3A%2F%2Fgithub.com%2Ffacebook%2Frocksdb%2Fissues%2F595%23issuecomment-96983273&h=9AQFYOWlo Multiple large write batches with column families cause a hang. The issue was caused by not doing flushes/compaction when the write controller was stopped. Test Plan: Create a DBTest from the user's test case Reviewers: igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37929 | 01 May 2015, 22:41:50 UTC |
b6b100f | Mark Callaghan | 01 May 2015, 21:17:45 UTC | Remove iter_refresh_interval_us Summary: The default, use one iter for the whole test, isn't good. This cost me a few hours of debugging and a few days of tessting. For readonly that isn't realistic and for read-write that keeps a lot of old sst files around. I remove the option because nothing uses it and not calling gettimeofday per loop iteration adds about 3% to QPS at 20 threads. Task ID: # Blame Rev: Test Plan: run db_bench 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/D37965 | 01 May 2015, 21:17:45 UTC |
197f01b | Adam Retter | 30 April 2015, 22:16:04 UTC | Bugfix remove deprecated option use which was removed in previous commit 019ecd19329ee895284e9b040df0ffe4c08b35d8 | 30 April 2015, 22:16:04 UTC |
aa094e8 | Adam Retter | 30 April 2015, 22:15:33 UTC | Fix conversion from nano-seconds to milli-seconds and seconds | 30 April 2015, 22:15:33 UTC |
dddceef | Igor Canadi | 30 April 2015, 18:11:04 UTC | Fix clang build Summary: fix build Test Plan: works Reviewers: kradhakrishnan Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37911 | 30 April 2015, 18:11:35 UTC |
d454065 | krad | 29 April 2015, 22:36:21 UTC | Optimize GetApproximateSizes() to use lesser CPU cycles. Summary: CPU profiling reveals GetApproximateSizes as a bottleneck for performance. The current implementation is sub-optimal, it scans every file in every level to compute the result. We can take advantage of the fact that all levels above 0 are sorted in the increasing order of key ranges and use binary search to locate the starting index. This can reduce the number of comparisons required to compute the result. Test Plan: We have good test coverage. Run the tests. Reviewers: sdong, igor, rven, dynamike Subscribers: dynamike, maykov, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37755 | 30 April 2015, 17:55:03 UTC |
fd96b55 | Igor Canadi | 30 April 2015, 16:29:51 UTC | Making GetOptions() comment better (#597) | 30 April 2015, 16:29:51 UTC |
7246ad3 | Igor Canadi | 29 April 2015, 20:35:48 UTC | Don't compact bottommost level in SuggestCompactRange Summary: Before the fix we also marked the bottommost level for compaction. This is wrong because then RocksDB has N+1 levels instead of N as before the compaction. Test Plan: SuggestCompactRangeTest in db_test Reviewers: yhchiang, rven Reviewed By: rven Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37869 | 29 April 2015, 20:35:48 UTC |
7f47ba0 | Igor Canadi | 29 April 2015, 17:52:31 UTC | Fix possible SIGSEGV in CompactRange (github issue #596) Summary: For very detailed explanation of what's happening read this: https://github.com/facebook/rocksdb/issues/596 Test Plan: make check + new unit test Reviewers: yhchiang, anthony, rven Reviewed By: rven Subscribers: adamretter, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37779 | 29 April 2015, 17:52:31 UTC |
aba005c | Yueh-Hsuan Chiang | 28 April 2015, 23:19:40 UTC | Merge pull request #585 from fyrz/RocksJava-RemoveDeprecatedStuff [RocksJava] Remove deprecated methods | 28 April 2015, 23:19:40 UTC |
d6f39c5 | agiardullo | 28 April 2015, 03:23:50 UTC | Helper function to time Merges 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 | 28 April 2015, 03:23:50 UTC |
a087f80 | Mark Callaghan | 28 April 2015, 02:32:56 UTC | Add scripts to run leveldb benchmark 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 | 28 April 2015, 02:32:56 UTC |
1bb4928 | Igor Canadi | 27 April 2015, 22:20:02 UTC | Include bunch of more events into EventLogger 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 | 27 April 2015, 22:20:02 UTC |
3db81d5 | Aashish Pant | 27 April 2015, 04:47:30 UTC | Fix memory leak in cache_test introduced in the previous commit Test Plan: Verified that valgrind build passes for cache_test Reviewers: igor Reviewed By: igor Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D37665 | 27 April 2015, 04:47:30 UTC |
4961a96 | Igor Canadi | 26 April 2015, 04:09:45 UTC | Fix build Summary: Build broken by https://github.com/facebook/rocksdb/commit/6ede020dc419c1621254f26060076ee6d2c2d792 Test Plan: make all Reviewers: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37689 | 26 April 2015, 04:12:52 UTC |
93ab147 | Igor Canadi | 26 April 2015, 03:47:11 UTC | Merge pull request #593 from charsyam/feature/type-1 fix typos | 26 April 2015, 03:47:11 UTC |
6ede020 | clark.kang | 25 April 2015, 09:14:27 UTC | fix typos | 25 April 2015, 09:14:27 UTC |
3d1af4a | Igor Canadi | 25 April 2015, 01:43:07 UTC | Don't preinstall jemalloc in Travis Summary: Since we enabled jemalloc for open source builds, Travis looks like it's dying. Don't install jemalloc when running in travis Test Plan: none Reviewers: yhchiang Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D37659 | 25 April 2015, 01:43:07 UTC |
242f9b4 | Aashish Pant | 24 April 2015, 21:45:12 UTC | Fix CLANG build issue introduced in previous commit Summary: Added keyword override for SetCapacity() Test Plan: Fixes build Reviewers: igor Reviewed By: igor Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D37647 | 24 April 2015, 21:45:12 UTC |
794ccfd | Aashish Pant | 24 April 2015, 21:12:58 UTC | Task 6532943: Rocksdb - SetCapacity() can dynamically change cache capacity if feasible Summary: When new capacity is larger than existing capacity, simply update the capacity to the new valie When new capacity is less than existing capacity, but more than the usage, simply update the capacity to new value When new capacity is less than the existing capacity and existing usage both, try to purge entries in LRU if feasible to make usage < capacity Test Plan: Created unit tests in cache_test.cc Reviewers: sdong, rven, yhchiang, igor Reviewed By: igor Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D37527 | 24 April 2015, 21:12:58 UTC |
98a4455 | sdong | 24 April 2015, 02:17:57 UTC | Build for CYGWIN 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 | 24 April 2015, 04:33:44 UTC |
d01bbb5 | sdong | 22 April 2015, 23:55:22 UTC | Fix CompactRange for universal compaction with num_levels > 1 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 | 24 April 2015, 02:12:31 UTC |
e003d38 | Igor Canadi | 24 April 2015, 01:08:37 UTC | Abstract out SetMaxPossibleForUserKey() and SetMinPossibleForUserKey Summary: Based on feedback from D37083. Are all of these correct? In some spaces it seems like we're doing SetMaxPossibleForUserKey() although we want the smallest possible internal key for user key. Test Plan: make check Reviewers: sdong Reviewed By: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37341 | 24 April 2015, 01:08:37 UTC |
fd7a357 | Igor Canadi | 24 April 2015, 00:48:18 UTC | Enable open source users to use jemalloc (github issue #438) Summary: Currently open source rocksdb only builds with tcmalloc. This diff first checks if jemalloc is available. If it is, it compiles with jemalloc. If it isn't, it checks for tcmalloc. Test Plan: Tried this out on my Ubuntu virtual machine and confirms that jemalloc is correctly detected and compiled. Reviewers: MarkCallaghan, yhchiang, rven, sdong Reviewed By: sdong Subscribers: adamretter, meyering, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36789 | 24 April 2015, 00:48:18 UTC |
aa14670 | Igor Canadi | 24 April 2015, 00:46:15 UTC | Add an assertion in CompactionPicker Summary: Reading CompactionPicker I noticed this dangerous substraction of two unsigned integers. We should assert to mark this as safe. Test Plan: make check Reviewers: anthony, rven, yhchiang, sdong Reviewed By: sdong Subscribers: kradhakrishnan, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37041 | 24 April 2015, 00:46:15 UTC |
2dc421d | Giuseppe Ottaviano | 23 April 2015, 19:10:36 UTC | Implement DB::PromoteL0 method Summary: This diff implements a new `DB` method `PromoteL0` which moves all files in L0 to a given level skipping compaction, provided that the files have disjoint ranges and all levels up to the target level are empty. This method provides finer-grain control for trivial compactions, and it is useful for bulk-loading pre-sorted keys. Compared to D34797, it does not change the semantics of an existing operation, which can impact existing code. PromoteL0 is designed to work well in combination with the proposed `GetSstFileWriter`/`AddFile` interface, enabling to "design" the level structure by populating one level at a time. Such fine-grained control can be very useful for static or mostly-static databases. Test Plan: `make check` Reviewers: IslamAbdelRahman, philipp, MarkCallaghan, yhchiang, igor, sdong Reviewed By: sdong Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D37107 | 23 April 2015, 19:10:36 UTC |
9bf40b6 | sdong | 20 April 2015, 18:15:35 UTC | Print max score in level summary Summary: Add more logging to help debugging issues. Test Plan: Run test suites Reviewers: yhchiang, rven, igor Reviewed By: igor Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D37401 | 23 April 2015, 18:34:36 UTC |
397b658 | sdong | 17 April 2015, 22:26:50 UTC | options.paranoid_file_checks to read all rows after writing to a file. Summary: To further distinguish the corruption cases were caused by storage media or in memory states when writing it, add a paranoid check after writing the file to iterate all the rows. Test Plan: Add a new unit test for it Reviewers: rven, igor Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D37335 | 23 April 2015, 18:34:35 UTC |
283a042 | Mark Callaghan | 23 April 2015, 16:18:25 UTC | Set --seed per test Summary: This is done to avoid having each thread use the same seed between runs of db_bench. Without this we can inflate the OS filesystem cache hit rate on reads for read heavy tests and generally see the same key sequences get generated between teste runs. 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/D37563 | 23 April 2015, 16:18:25 UTC |
618d07b | Venkatesh Radhakrishnan | 23 April 2015, 15:35:02 UTC | Making PreShutdown tests more reliable. Summary: A couple of times on Travis, we have had the thread status say that there were no compactions done and since we assert for it, the test failed. We now fix this by waiting till compaction started. Test Plan: run DBTEST::*PreShutdown* d=/tmp/j; rm -rf $d; seq 200 | parallel --gnu --eta 'd=/tmp/j/d-{}; mkdir -p $d; TEST_TMPDIR=$d ./db_test --gtest_filter=DBTest.PreShutdown* >& '$d'/log-{}' Reviewers: sdong, igor Reviewed By: igor Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D37545 | 23 April 2015, 15:35:02 UTC |
0a91bca | Jim Meyering | 23 April 2015, 15:00:56 UTC | test: avoid vuln-inducing use of temporary directory Summary: Without this change, someone on the machine on which I run "make check" could cause me to overwrite arbitrary files owned by me, via a symlink attack. Instead of using a predictable temporary directory and accepting to use a preexisting one, always create a new one using mkdtemp. If $TEST_IOCTL_FRIENDLY_TMPDIR is set and usable, attempt first to find a usable temporary directory therein. If not, or if unusable, then try /var/tmp and /tmp. If none of those is usable abort with a diagnostic. To do that, I added a new class. Its constructor finds a suitable directory or aborts, the sole member prints that directory's name, and the destructor unlinks what should be an empty directory. Note that while the code before this did not remove its temporary directory, there was only one per $UID. Now, there would be at least one per run or one per test, depending on implementation, so it is important to remove them. Test Plan: Run this on a fedora rawhide system, where /tmp is a tmpfs file system, and /var/tmp is ext4. # This gives a diagnostic that /dev/shm is not suitable # and ends up using /var/tmp. TEST_IOCTL_FRIENDLY_TMPDIR=/dev/shm ./env_test # Uses /var/tmp; same as when envvar not set. TEST_IOCTL_FRIENDLY_TMPDIR=/var/tmp ./env_test # Uses /tmp unless it's tmpfs, in which case it gives # a diagnostic and uses /var/tmp. TEST_IOCTL_FRIENDLY_TMPDIR=/tmp ./env_test Reviewers: ljin, rven, igor.sugak, yhchiang, sdong, igor Reviewed By: igor Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D37287 | 23 April 2015, 15:00:56 UTC |
6e35941 | Mark Callaghan | 23 April 2015, 00:17:50 UTC | Add rpath for production builds Summary: This lets the production toolchain libraries get used on devservers and in production. Task ID: #6849362 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/D37533 | 23 April 2015, 00:17:50 UTC |
78dbd08 | Mark Callaghan | 22 April 2015, 20:23:08 UTC | Improve benchmark scripts Summary: This adds: 1) use of --level_compaction_dynamic_level_bytes=true 2) use of --bytes_per_sync=2M The second is a big win for disks. The first helps in general. This also adds a new test, fillseq with 32kb values to increase the peak ingest and make it more likely that storage limits throughput. Sample outpout from the first 3 tests - https://gist.github.com/mdcallag/e793bd3038e367b05d6f 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/D37509 | 22 April 2015, 20:23:08 UTC |
6a5ffee | Igor Canadi | 22 April 2015, 19:47:50 UTC | Fix gflags Makefile Summary: `echo` correctly interpretes \n on mac, but not on linux. On linux you have to give it `-e` to interpret \n. Unfortunately, `-e` options is not available on Mac. Go back to old way of checking gflags Test Plan: build_tools/build_detect_platform on mac and linux Reviewers: sdong Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D37515 | 22 April 2015, 19:50:28 UTC |
108a927 | Siying Dong | 21 April 2015, 21:57:36 UTC | Merge pull request #589 from coderplay/patch-1 Add "Tango Me" section in USERS.md | 21 April 2015, 21:57:36 UTC |
a58fd74 | Min Zhou | 21 April 2015, 21:53:09 UTC | Update USERS.md | 21 April 2015, 21:53:09 UTC |
d85d08c | Igor Canadi | 21 April 2015, 03:45:25 UTC | One last fix to Makefile Summary: Based on comment from D37455 Test Plan: make install after make static_lib Reviewers: meyering Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D37461 | 21 April 2015, 03:46:08 UTC |
2db96dc | Igor Canadi | 21 April 2015, 03:30:04 UTC | Fix make install when there is no shared lib Summary: make install fails when there is no shared lib. We need to revert the conditions, which will have the same effect, but without the failure Test Plan: make install after only compiling static library Reviewers: meyering Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37455 | 21 April 2015, 03:39:54 UTC |
7d13699 | Igor Canadi | 21 April 2015, 02:44:02 UTC | Get rid of error output Summary: We should send error output to /dev/null Test Plan: none Reviewers: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37449 | 21 April 2015, 02:44:32 UTC |
79c1b02 | Igor Canadi | 21 April 2015, 02:39:51 UTC | Fix Makefile Summary: The current version tries to install librocksdb.so even though it doesn't exist. This version will install librocksdb.so.3.10.0 and then create soft links in place Test Plan: `make static_lib; sudo make install` does not try to install librocksdb.so `make shared_lib; sudo make install` installs one library and 3 symlinks. Before, four libraries were installed Reviewers: sdong, meyering Reviewed By: meyering Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37425 | 21 April 2015, 02:39:51 UTC |
742fa9e | Igor Canadi | 20 April 2015, 17:55:17 UTC | Fix compile with two gflags Summary: If the system has gflags with both `google` and `gflags` namespaces installed, we try to define GFLAGS as two things. This breaks the compile. Fix: Use `else if` -- try compiling with `google` namespace only if compile with `gflags` failed Test Plan: build_tools/build_detect_platform correctly identifies gflags Reviewers: lgalanis Reviewed By: lgalanis Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37389 | 20 April 2015, 17:55:17 UTC |
79c21ec | Jim Meyering | 18 April 2015, 03:39:02 UTC | skip ioctl-using tests when not supported Summary: [NB: this is a prerequisite for the /tmp-abuse-fixing patch] This avoids spurious test failure on Linux systems like Fedora for which /tmp is a tmpfs file system. On a devtmpfs file system, ioctl(fd, FS_IOC_GETVERSION, &version) returns -1 with errno == ENOTTTY, indicating that that ioctl is not supported on such a file system. Do not let this cause test failures, e.g., where env_test would assert that file->GetUniqueId(...) > 0. Before this change, ./env_test would fail these three tests on a fedora rawhide system: [ FAILED ] 3 tests, listed below: [ FAILED ] EnvPosixTest.RandomAccessUniqueID [ FAILED ] EnvPosixTest.RandomAccessUniqueIDConcurrent [ FAILED ] EnvPosixTest.RandomAccessUniqueIDDeletes 3 FAILED TESTS The fix: When support for that ioctl is lacking, skip each affected test. Could be improved by noting which sub-tests are being skipped. Test Plan: run these on F21 and note that they now pass. TEST_TMPDIR=/dev/shm/rdb ./env_test ./env_test Reviewers: ljin, rven, igor.sugak, yhchiang, sdong, igor Reviewed By: igor Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D37323 | 18 April 2015, 03:39:02 UTC |
6059bdf | Igor Canadi | 17 April 2015, 23:44:45 UTC | Add experimental API MarkForCompaction() Summary: Some Mongo+Rocks datasets in Parse's environment are not doing compactions very frequently. During the quiet period (with no IO), we'd like to schedule compactions so that our reads become faster. Also, aggressively compacting during quiet periods helps when write bursts happen. In addition, we also want to compact files that are containing deleted key ranges (like old oplog keys). All of this is currently not possible with CompactRange() because it's single-threaded and blocks all other compactions from happening. Running CompactRange() risks an issue of blocking writes because we generate too much Level 0 files before the compaction is over. Stopping writes is very dangerous because they hold transaction locks. We tried running manual compaction once on Mongo+Rocks and everything fell apart. MarkForCompaction() solves all of those problems. This is very light-weight manual compaction. It is lower priority than automatic compactions, which means it shouldn't interfere with background process keeping the LSM tree clean. However, if no automatic compactions need to be run (or we have extra background threads available), we will start compacting files that are marked for compaction. Test Plan: added a new unit test Reviewers: yhchiang, rven, MarkCallaghan, sdong Reviewed By: sdong Subscribers: yoshinorim, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37083 | 17 April 2015, 23:44:45 UTC |
acf8a41 | Jim Meyering | 17 April 2015, 21:54:17 UTC | maint: use ASSERT_TRUE, not ASSERT_EQ(true; same for false Summary: The usage I'm fixing here caused trouble on Fedora 21 when compiling with the current gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC): db/write_controller_test.cc: In member function ‘virtual void rocksdb::WriteControllerTest_SanityTest_Test::TestBody()’: db/write_controller_test.cc:23:165: error: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Werror=conversion-null] ASSERT_EQ(false, controller.IsStopped()); ^ This change was induced mechanically via: git grep -l -E 'ASSERT_EQ\(false'|xargs perl -pi -e 's/ASSERT_EQ\(false, /ASSERT_FALSE(/' git grep -l -E 'ASSERT_EQ\(true'|xargs perl -pi -e 's/ASSERT_EQ\(true, /ASSERT_TRUE(/' Except for the three in utilities/backupable/backupable_db_test.cc for which I ended up reformatting (joining lines) in the result. As for why this problem is exhibited with that version of gcc, and none of the others I've used (from 4.8.1 through gcc-5.0.0 and newer), I suspect it's a bug in F21's gcc that has been fixed in gcc-5.0.0. Test Plan: "make" now succeed on Fedora 21 Reviewers: ljin, rven, igor.sugak, yhchiang, sdong, igor Reviewed By: igor Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D37329 | 17 April 2015, 21:54:17 UTC |
b5400f9 | Igor Canadi | 17 April 2015, 19:07:47 UTC | Kill dead code Summary: this is not used anywhere Test Plan: compiles Reviewers: yhchiang, sdong Reviewed By: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37053 | 17 April 2015, 19:07:47 UTC |
48b0a04 | Igor Canadi | 17 April 2015, 02:31:34 UTC | Speed up reduce_levels_test Summary: For some reason reduce_levels is opening the databse with 65.000 levels. This makes ComputeCompactionScore() function terribly slow and the tests is also very slow (20seconds). Test Plan: mr reduce_levels_test now takes 20ms Reviewers: sdong, rven, kradhakrishnan, yhchiang Reviewed By: yhchiang Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37059 | 17 April 2015, 02:31:34 UTC |
00c2afc | Igor Canadi | 17 April 2015, 02:31:10 UTC | Fix bug in ExpandWhileOverlapping() Summary: If ExpandWhileOverlapping() we don't clear inputs. That's a bug introduced by my recent patch https://reviews.facebook.net/D36687. However, we have no tests covering ExpandWhileOverlapping(). I created a task t6771252 to add ExpandWhileOverlapping() tests. Test Plan: make check Reviewers: sdong, rven, yhchiang Reviewed By: yhchiang Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D37077 | 17 April 2015, 02:31:10 UTC |
019ecd1 | fyrz | 15 April 2015, 21:43:30 UTC | [RocksJava] Remove deprecated methods Summary: - Removed deprecated ColumnFamilyDescript constructor methods - Removed deprecated skipLogErrorOnRecovery methods - Removed deprecated tableCacheRemoveScanCountLimit methods Test Plan: make rocksdbjava make jtest Reviewers: yhchiang, adamretter, ankgup87 Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D37191 | 15 April 2015, 22:31:43 UTC |
98ef21d | Igor Canadi | 15 April 2015, 21:56:36 UTC | Merge pull request #584 from pshareghi/rocksdb-3.10-falloch Added falloc.h in build_detect_platform | 15 April 2015, 21:56:36 UTC |
5b7131c | fyrz | 15 April 2015, 21:35:09 UTC | [RocksJava] Removed deprecated skipLogErrorOnRecovery methods. As annonunced these options are not used anymore so these are removed from code. | 15 April 2015, 21:37:24 UTC |
566f652 | fyrz | 15 April 2015, 21:31:59 UTC | [RocksJava] Removed deprecated ColumnFamilyDescriptor methods As announced previously removed methods are obsolete and will be replaced by its byte array pendants. | 15 April 2015, 21:31:59 UTC |
6997aa0 | Igor Canadi | 15 April 2015, 21:23:29 UTC | Merge pull request #582 from fyrz/RocksJava-Fix-RateLimiter [RocksJava] Fix RateLimiter Tests in 3.10 | 15 April 2015, 21:23:29 UTC |
582c4b0 | fyrz | 15 April 2015, 21:19:41 UTC | [RocksJava] Fix RateLimiter Tests in 3.10 | 15 April 2015, 21:19:41 UTC |
6cfb215 | Igor Canadi | 15 April 2015, 20:36:27 UTC | Merge pull request #581 from vladb38/patch-3 Update USERS.md | 15 April 2015, 20:36:27 UTC |
d71e8f7 | Vlad Balan | 15 April 2015, 20:25:52 UTC | Update USERS.md | 15 April 2015, 20:25:52 UTC |
debaf85 | sdong | 15 April 2015, 02:58:52 UTC | Bug of trivial move of dynamic level Summary: D36669 introduces a bug that trivial moved data is not going to specific level but the next level, which will incorrectly be level 1 for level 0 compaciton if base level is not level 1. Fixing it by appreciating the output level Test Plan: Run all tests Reviewers: MarkCallaghan, rven, yhchiang, igor Reviewed By: igor Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D37119 | 15 April 2015, 04:42:08 UTC |
12d7d3d | sdong | 14 April 2015, 23:53:19 UTC | Fix and Improve DBTest.DynamicLevelCompressionPerLevel2 Summary: Recent change of DBTest.DynamicLevelCompressionPerLevel2 has a bug that the second sync point is not enabled. Fix it. Also add an assert for that. Also, flush compression is not tracked in the test. Add it. Test Plan: Build everything Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D37101 | 15 April 2015, 04:42:08 UTC |
a1271c6 | sdong | 14 April 2015, 23:39:23 UTC | Fix build break introduced by new SyncPoint interface change Summary: When commiting the sync point interface change, didn't resolve the new occurance of the old interface in rebase. Fix it. Test Plan: Build and see it pass Reviewers: igor, yhchiang, rven, anthony, kradhakrishnan Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D37095 | 14 April 2015, 23:42:37 UTC |
fcb206b | sdong | 14 April 2015, 08:55:19 UTC | SyncPoint to allow a callback with an argument and use it to get DBTest.DynamicLevelCompressionPerLevel2 more straight-forward Summary: Allow users to give a callback function with parameter using sync point, so more complicated verification can be done in tests. Use it in DBTest.DynamicLevelCompressionPerLevel2 so that failures will be more easy to debug. Test Plan: Run all tests. Run DBTest.DynamicLevelCompressionPerLevel2 with valgrind check. Reviewers: rven, yhchiang, anthony, kradhakrishnan, igor Reviewed By: igor Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D36999 | 14 April 2015, 23:18:50 UTC |
281db8b | Igor Canadi | 14 April 2015, 02:30:40 UTC | Temporarily disable test CompactFilesOnLevelCompaction Summary: https://reviews.facebook.net/D36963 made the debug build much faster and that triggered failures of CompactFilesOnLevelCompaction test. 3 out of 4 last tests on Jenkins failed. I'm disabling this test temporarily, since we likely know the reason why it's failing and there's already work in progress to address it -- https://reviews.facebook.net/D36225 Test Plan: none Reviewers: sdong, rven, yhchiang, meyering Reviewed By: meyering Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36993 | 14 April 2015, 02:30:40 UTC |
e8808b9 | Pooya Shareghi | 14 April 2015, 00:56:12 UTC | Added falloc.h in build_detect_platform On Centos 6, you need to explicitely include linux/falloc.h which is whele the FALLOC_FL_* flags are defined. Otherwise, the fallocate() support test defined in build_detect_platform will fail. Signed-off-by: Pooya Shareghi <shareghi@gmail.com> | 14 April 2015, 00:56:12 UTC |
1983fad | Igor Canadi | 14 April 2015, 00:33:24 UTC | assert(sorted) in vector rep Summary: based on discussion on https://reviews.facebook.net/D36969 Test Plan: will let jenkins do its job Reviewers: sdong Reviewed By: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36975 | 14 April 2015, 00:33:24 UTC |
9da8748 | Mark Callaghan | 14 April 2015, 00:18:07 UTC | Get benchmark.sh loads to run faster Summary: This changes loads to use vector memtable and disable the WAL. This also increases the chance we will see IO bottlenecks during loads which is good to stress test HW. But I also think it is a good way to load data quickly as this is a bulk operation and the WAL isn't needed. The two numbers below are the MB/sec rates for fillseq, bulkload using a skiplist or vector memtable and the WAL enabled or disabled. There is a big benefit from using the vector memtable and WAL disabled. Alas there is also a perf bug in the use of std::sort for ordered input when the vector is flushed. Task is open for that. 112, 66 - skiplist with wal 250, 116 - skiplist without wal 110, 108 - vector with wal 232, 370 - vector without wal 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/D36957 | 14 April 2015, 00:18:07 UTC |
9b983be | Igor Canadi | 13 April 2015, 23:15:05 UTC | Fix flakiness of WalManagerTest Summary: We should use mocked-out env for these tests to make it more realiable. Added benefit is that instead of actually sleeping for 3 seconds, we can instead pretend to sleep and just increase time counters. Test Plan: for i in `seq 100`; do ./wal_manager_test --gtest_filter=WalManagerTest.WALArchivalTtl ;done Reviewers: rven, meyering Reviewed By: meyering Subscribers: meyering, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36951 | 13 April 2015, 23:15:05 UTC |
d41a565 | Igor Canadi | 13 April 2015, 23:11:47 UTC | Don't do O(N^2) operations in debug mode for vector memtable Summary: As title. For every operation we're asserting Valid(), which sorts the data. That's pretty terrible. We have to be careful to have decent performance even with DEBUG builds. Test Plan: make check Reviewers: sdong, rven, yhchiang, MarkCallaghan Reviewed By: MarkCallaghan Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36969 | 13 April 2015, 23:11:47 UTC |
08be180 | Igor Canadi | 13 April 2015, 22:58:45 UTC | Fix bad performance in debug mode Summary: See github issue 574: https://github.com/facebook/rocksdb/issues/574 Basically when we're running in DEBUG mode we're calling `usleep(0)` on every mutex lock. I bisected the issue to https://reviews.facebook.net/D36963. Instead of calling sleep(0), this diff just avoids calling SleepForMicroseconds() when delay is not set. Test Plan: bpl=10485760;overlap=10;mcz=2;del=300000000;levels=2;ctrig=10000000; delay=10000000; stop=10000000; wbn=30; mbc=20; mb=1073741824;wbs=268435456; dds=1; sync=0; r=100000; t=1; vs=800; bs=65536; cs=1048576; of=500000; si=1000000; ./db_bench --benchmarks=fillrandom --disable_seek_compaction=1 --mmap_read=0 --statistics=1 --histogram=1 --num=$r --threads=$t --value_size=$vs --block_size=$bs --cache_size=$cs --bloom_bits=10 --cache_numshardbits=4 --open_files=$of --verify_checksum=1 --db=/tmp/rdb10test --sync=$sync --disable_wal=1 --compression_type=snappy --stats_interval=$si --compression_ratio=0.5 --disable_data_sync=$dds --write_buffer_size=$wbs --target_file_size_base=$mb --max_write_buffer_number=$wbn --max_background_compactions=$mbc --level0_file_num_compaction_trigger=$ctrig --level0_slowdown_writes_trigger=$delay --level0_stop_writes_trigger=$stop --num_levels=$levels --delete_obsolete_files_period_micros=$del --min_level_to_compress=$mcz --max_grandparent_overlap_factor=$overlap --stats_per_interval=1 --max_bytes_for_level_base=$bpl --memtablerep=vector --use_existing_db=0 --disable_auto_compactions=1 --source_compaction_factor=10000000 | grep ops Before: fillrandom : 117.525 micros/op 8508 ops/sec; 6.6 MB/s After: fillrandom : 1.283 micros/op 779502 ops/sec; 606.6 MB/s Reviewers: rven, yhchiang, sdong Reviewed By: sdong Subscribers: meyering, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36963 | 13 April 2015, 22:58:45 UTC |
0a0501c | Venkatesh Radhakrishnan | 13 April 2015, 21:21:32 UTC | Add Xfunc to makefile Summary: Make target for running all xfunc tests Test Plan: make xfunc Reviewers: igor, sdong, meyering Reviewed By: meyering Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36873 | 13 April 2015, 21:21:32 UTC |
e7ad149 | Igor Canadi | 13 April 2015, 18:39:45 UTC | Fix flakiness in FIFOCompaction test (github issue #573) Summary: The problem is that sometimes two memtables will be compacted together into a single file. In that case, our assertion ASSERT_EQ(NumTableFilesAtLevel(0), 5); fails because same amount of data is in 4 files instead of 5. We should wait for flush so that we prevent two memtables merging into a single file. Test Plan: `for i in `seq 20`; do mrtest FIFOCompactionTest; done` -- fails at least once before. fails zero times after. Reviewers: rven Reviewed By: rven Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36939 | 13 April 2015, 18:39:45 UTC |
abb4052 | Igor Canadi | 13 April 2015, 17:17:42 UTC | Kill benchharness Summary: 1. it doesn't work 2. we're not using it In the future, if we need general benchmark framework, we should probably use https://github.com/google/benchmark Test Plan: make all Reviewers: yhchiang, rven, anthony, sdong Reviewed By: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36777 | 13 April 2015, 17:17:42 UTC |
894e9f7 | Dhruba Borthakur | 12 April 2015, 07:02:21 UTC | Update Patent Grant. Summary: https://code.facebook.com/posts/1639473982937255/updating-our-open-source-patent-grant/ This has been done by other FB's open source projects already: https://github.com/facebook/react/commit/b8ba8c83f318b84e42933f6928f231dc0918f864 https://github.com/facebook/osquery/blob/master/PATENTS Test Plan: make check Reviewers: igor, sdong Reviewed By: sdong Subscribers: jamesgpearce, leveldb, dhruba Differential Revision: https://reviews.facebook.net/D36879 | 13 April 2015, 09:33:43 UTC |
590fadc | Igor Canadi | 10 April 2015, 22:14:27 UTC | Fix compile warning on CLANG Summary: oops Test Plan: compiles now Reviewers: sdong, yhchiang Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36867 | 10 April 2015, 22:14:57 UTC |
47b8743 | Igor Canadi | 10 April 2015, 22:01:54 UTC | Make Compaction class easier to use Summary: The goal of this diff is to make Compaction class easier to use. This should also make new compaction algorithms easier to write (like CompactFiles from @yhchiang and dynamic leveled and multi-leveled universal from @sdong). Here are couple of things demonstrating that Compaction class is hard to use: 1. we have two constructors of Compaction class 2. there's this thing called grandparents_, but it appears to only be setup for leveled compaction and not compactfiles 3. it's easy to introduce a subtle and dangerous bug like this: D36225 4. SetupBottomMostLevel() is hard to understand and it shouldn't be. See this comment: https://github.com/facebook/rocksdb/blob/afbafeaeaebfd27a0f3e992fee8e0c57d07658fa/db/compaction.cc#L236-L241. It also made it harder for @yhchiang to write CompactFiles, as evidenced by this: https://github.com/facebook/rocksdb/blob/afbafeaeaebfd27a0f3e992fee8e0c57d07658fa/db/compaction_picker.cc#L204-L210 The problem is that we create Compaction object, which holds a lot of state, and then pass it around to some functions. After those functions are done mutating, then we call couple of functions on Compaction object, like SetupBottommostLevel() and MarkFilesBeingCompacted(). It is very hard to see what's happening with all that Compaction's state while it's travelling across different functions. If you're writing a new PickCompaction() function you need to try really hard to understand what are all the functions you need to run on Compaction object and what state you need to setup. My proposed solution is to make important parts of Compaction immutable after construction. PickCompaction() should calculate compaction inputs and then pass them onto Compaction object once they are finalized. That makes it easy to create a new compaction -- just provide all the parameters to the constructor and you're done. No need to call confusing functions after you created your object. This diff doesn't fully achieve that goal, but it comes pretty close. Here are some of the changes: * have one Compaction constructor instead of two. * inputs_ is constant after construction * MarkFilesBeingCompacted() is now private to Compaction class and automatically called on construction/destruction. * SetupBottommostLevel() is gone. Compaction figures it out on its own based on the input. * CompactionPicker's functions are not passing around Compaction object anymore. They are only passing around the state that they need. Test Plan: make check make asan_check make valgrind_check Reviewers: rven, anthony, sdong, yhchiang Reviewed By: yhchiang Subscribers: sdong, yhchiang, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36687 | 10 April 2015, 22:01:54 UTC |
753dd1f | agiardullo | 10 April 2015, 21:16:03 UTC | Fix valgrind issues in memtable_list_test Summary: Need to remember to unref MemTableList->current() before deleting. Test Plan: ran test with valgrind Reviewers: igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36855 | 10 April 2015, 21:16:03 UTC |
697380f | krad | 09 April 2015, 23:11:15 UTC | Repairer documentation improvement. Summary: Adding verbosity to existing comments. Test Plan: None Reviewers: sdong CC: leveldb Task ID: #6718960 Blame Rev: | 10 April 2015, 19:35:28 UTC |