SHARE
TWEET

Untitled

a guest Aug 24th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/db/external_sst_file_test.cc b/db/external_sst_file_test.cc
  2. index ebd6cb2b1..5e5c0527c 100644
  3. --- a/db/external_sst_file_test.cc
  4. +++ b/db/external_sst_file_test.cc
  5. @@ -2335,6 +2335,34 @@ TEST_F(ExternalSSTFileTest, SkipBloomFilter) {
  6.    }
  7.  }
  8.  
  9. +TEST_F(ExternalSSTFileTest, IngestMultipleFilesToL0) {
  10. +  const int kNumLevels = 2;
  11. +  const int kNumFilesPerLevel = 2;
  12. +  Options options = CurrentOptions();
  13. +  options.num_levels = kNumLevels;
  14. +  DestroyAndReopen(options);
  15. +  for (int l = 0; l < kNumLevels; ++l) {
  16. +    IngestExternalFileOptions ifo;
  17. +    ifo.allow_global_seqno = true;
  18. +    std::vector<std::vector<std::pair<std::string, std::string>>> data;
  19. +    data.push_back(
  20. +        {std::make_pair("foo1", "fv1"), std::make_pair("foo2", "fv2")});
  21. +    data.push_back(
  22. +        {std::make_pair("bar1", "bv1"), std::make_pair("bar2", "bv2")});
  23. +    std::vector<std::map<std::string, std::string>> true_data(kNumFilesPerLevel);
  24. +    int file_id = (++last_file_id_);
  25. +    Status s;
  26. +    std::vector<std::string> external_file_paths(kNumFilesPerLevel);
  27. +    for (size_t i = 0; i != kNumFilesPerLevel; ++i) {
  28. +      ASSERT_OK(GenerateOneExternalFile(
  29. +          options, dbfull()->DefaultColumnFamily(), data[i], file_id, false,
  30. +          &external_file_paths[i], &true_data[i]));
  31. +      ++file_id;
  32. +    }
  33. +    ASSERT_OK(db_->IngestExternalFile(dbfull()->DefaultColumnFamily(), external_file_paths, ifo));
  34. +  }
  35. +}
  36. +
  37.  TEST_F(ExternalSSTFileTest, IngestFileWrittenWithCompressionDictionary) {
  38.    if (!ZSTD_Supported()) {
  39.      return;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top