Created
August 12, 2019 15:58
-
-
Save ajkr/29dc4a6c398d549c8e6fd73c904afe1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git diff | |
diff --git a/db/external_sst_file_test.cc b/db/external_sst_file_test.cc | |
index ebd6cb2b1..5e5c0527c 100644 | |
--- a/db/external_sst_file_test.cc | |
+++ b/db/external_sst_file_test.cc | |
@@ -2335,6 +2335,34 @@ TEST_F(ExternalSSTFileTest, SkipBloomFilter) { | |
} | |
} | |
+TEST_F(ExternalSSTFileTest, IngestMultipleFilesToL0) { | |
+ const int kNumLevels = 2; | |
+ const int kNumFilesPerLevel = 2; | |
+ Options options = CurrentOptions(); | |
+ options.num_levels = kNumLevels; | |
+ DestroyAndReopen(options); | |
+ for (int l = 0; l < kNumLevels; ++l) { | |
+ IngestExternalFileOptions ifo; | |
+ ifo.allow_global_seqno = true; | |
+ std::vector<std::vector<std::pair<std::string, std::string>>> data; | |
+ data.push_back( | |
+ {std::make_pair("foo1", "fv1"), std::make_pair("foo2", "fv2")}); | |
+ data.push_back( | |
+ {std::make_pair("bar1", "bv1"), std::make_pair("bar2", "bv2")}); | |
+ std::vector<std::map<std::string, std::string>> true_data(kNumFilesPerLevel); | |
+ int file_id = (++last_file_id_); | |
+ Status s; | |
+ std::vector<std::string> external_file_paths(kNumFilesPerLevel); | |
+ for (size_t i = 0; i != kNumFilesPerLevel; ++i) { | |
+ ASSERT_OK(GenerateOneExternalFile( | |
+ options, dbfull()->DefaultColumnFamily(), data[i], file_id, false, | |
+ &external_file_paths[i], &true_data[i])); | |
+ ++file_id; | |
+ } | |
+ ASSERT_OK(db_->IngestExternalFile(dbfull()->DefaultColumnFamily(), external_file_paths, ifo)); | |
+ } | |
+} | |
+ | |
TEST_F(ExternalSSTFileTest, IngestFileWrittenWithCompressionDictionary) { | |
if (!ZSTD_Supported()) { | |
return; | |
$ KEEP_DB=1 ./external_sst_file_test --gtest_filter=ExternalSSTFileTest.IngestMultipleFilesToL0 | |
Note: Google Test filter = ExternalSSTFileTest.IngestMultipleFilesToL0 | |
[==========] Running 1 test from 1 test case. | |
[----------] Global test environment set-up. | |
[----------] 1 test from ExternalSSTFileTest | |
[ RUN ] ExternalSSTFileTest.IngestMultipleFilesToL0 | |
L0 file with seqno 1 1 vs. file with global_seqno 1 | |
Received signal 6 (Aborted) | |
#0 /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7) [0x7efe7f0b7e97] ?? ??:0 | |
#1 /lib/x86_64-linux-gnu/libc.so.6(abort+0x141) [0x7efe7f0b9801] ?? ??:0 | |
#2 ./external_sst_file_test(+0x2e6093) [0x55be0f993093] ?? ??:0 | |
#3 ./external_sst_file_test(+0x2e6fbb) [0x55be0f993fbb] ?? ??:0 | |
#4 ./external_sst_file_test(+0x2e55d8) [0x55be0f9925d8] ?? ??:0 | |
#5 ./external_sst_file_test(+0x302175) [0x55be0f9af175] ?? ??:0 | |
#6 ./external_sst_file_test(+0x304edd) [0x55be0f9b1edd] ?? ??:0 | |
#7 ./external_sst_file_test(+0x1b6283) [0x55be0f863283] ?? ??:0 | |
#8 ./external_sst_file_test(+0x1b4779) [0x55be0f861779] ?? ??:0 | |
#9 ./external_sst_file_test(+0x9144d) [0x55be0f73e44d] ?? ??:0 | |
#10 ./external_sst_file_test(+0x648cf0) [0x55be0fcf5cf0] ?? ??:0 | |
#11 ./external_sst_file_test(+0x643c3b) [0x55be0fcf0c3b] ?? ??:0 | |
#12 ./external_sst_file_test(+0x6295c6) [0x55be0fcd65c6] ?? ??:0 | |
#13 ./external_sst_file_test(+0x629e16) [0x55be0fcd6e16] ?? ??:0 | |
#14 ./external_sst_file_test(+0x62a48c) [0x55be0fcd748c] ?? ??:0 | |
#15 ./external_sst_file_test(+0x6312ca) [0x55be0fcde2ca] ?? ??:0 | |
#16 ./external_sst_file_test(+0x649d39) [0x55be0fcf6d39] ?? ??:0 | |
#17 ./external_sst_file_test(+0x644923) [0x55be0fcf1923] ?? ??:0 | |
#18 ./external_sst_file_test(+0x62feb2) [0x55be0fcdceb2] ?? ??:0 | |
#19 ./external_sst_file_test(+0xa7088) [0x55be0f754088] ?? ??:0 | |
#20 ./external_sst_file_test(+0x99d27) [0x55be0f746d27] ?? ??:0 | |
#21 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7efe7f09ab97] ?? ??:0 | |
#22 ./external_sst_file_test(+0x4fc0a) [0x55be0f6fcc0a] ?? ??:0 | |
Aborted (core dumped) | |
$ ldb manifest_dump --path=/tmp/rocksdbtest-1000/external_sst_file_test_9939206188920710905/MANIFEST-000008 | head | |
--------------- Column family "default" (ID 0) -------------- | |
log number: 0 | |
comparator: leveldb.BytewiseComparator | |
--- level 0 --- version# 1 --- | |
--- level 1 --- version# 1 --- | |
7:848['bar1' seq:0, type:1 .. 'bar2' seq:0, type:1] | |
6:848['foo1' seq:0, type:1 .. 'foo2' seq:0, type:1] | |
--- level 2 --- version# 1 --- | |
--- level 3 --- version# 1 --- | |
--- level 4 --- version# 1 --- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment