Lines Matching refs:options
40 Options options = last_options_; in TEST_P() local
41 options.comparator = ReverseBytewiseComparator(); in TEST_P()
42 options.prefix_extractor.reset(NewCappedPrefixTransform(3)); in TEST_P()
43 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_P()
52 options.table_factory.reset(NewBlockBasedTableFactory(bbto)); in TEST_P()
53 DestroyAndReopen(options); in TEST_P()
133 Options options = CurrentOptions(); in TEST_F() local
134 options.create_if_missing = true; in TEST_F()
135 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_F()
139 options.table_factory.reset(new BlockBasedTableFactory(table_options)); in TEST_F()
140 CreateAndReopenWithCF({"pikachu"}, options); in TEST_F()
145 TryReopenWithColumnFamilies({"default", "pikachu"}, options); in TEST_F()
152 Options options = CurrentOptions(); in TEST_F() local
153 options.create_if_missing = true; in TEST_F()
154 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_F()
155 options.max_successive_merges = 3; in TEST_F()
156 options.merge_operator = MergeOperators::CreatePutOperator(); in TEST_F()
157 options.disable_auto_compactions = true; in TEST_F()
158 DestroyAndReopen(options); in TEST_F()
163 options.max_successive_merges = 2; in TEST_F()
164 Reopen(options); in TEST_F()
183 Options options = CurrentOptions(); in TEST_P() local
184 options.arena_block_size = 4096; in TEST_P()
207 options.db_write_buffer_size = 120000; // this is the real limit in TEST_P()
209 options.write_buffer_manager.reset(new WriteBufferManager(114285)); in TEST_P()
211 options.write_buffer_manager.reset(new WriteBufferManager(114285, cache)); in TEST_P()
213 options.write_buffer_size = 500000; // this is never hit in TEST_P()
214 CreateAndReopenWithCF({"pikachu", "dobrynia", "nikitich"}, options); in TEST_P()
345 options.write_buffer_manager.reset(); in TEST_P()
360 Options options = CurrentOptions(); in TEST_F() local
361 options.arena_block_size = 4096; in TEST_F()
378 options.write_buffer_size = 500000; // this is never hit in TEST_F()
381 options.write_buffer_manager.reset(new WriteBufferManager(120000)); in TEST_F()
382 CreateAndReopenWithCF({"cf1", "cf2"}, options); in TEST_F()
384 ASSERT_OK(DestroyDB(dbname2, options)); in TEST_F()
386 ASSERT_OK(DB::Open(options, dbname2, &db2)); in TEST_F()
454 ASSERT_OK(DestroyDB(dbname2, options)); in TEST_F()
460 Options options = CurrentOptions(); in TEST_F() local
461 options.arena_block_size = 4096; in TEST_F()
464 options.write_buffer_size = 50000; // this is never hit in TEST_F()
467 options.write_buffer_manager.reset(new WriteBufferManager(0, cache)); in TEST_F()
468 Reopen(options); in TEST_F()
557 Options options = OptionsForLogIterTest(); in TEST_F() local
558 DestroyAndReopen(options); in TEST_F()
559 CreateAndReopenWithCF({ "pikachu" }, options); in TEST_F()
580 options = OptionsForLogIterTest(); in TEST_F()
581 options.wal_filter = &test_wal_filter; in TEST_F()
583 TryReopenWithColumnFamilies({ "default", "pikachu" }, options); in TEST_F()
589 options.paranoid_checks = false; in TEST_F()
590 ReopenWithColumnFamilies({ "default", "pikachu" }, options); in TEST_F()
667 options = OptionsForLogIterTest(); in TEST_F()
668 ReopenWithColumnFamilies({ "default", "pikachu" }, options); in TEST_F()
745 Options options = OptionsForLogIterTest(); in TEST_F() local
746 DestroyAndReopen(options); in TEST_F()
747 CreateAndReopenWithCF({ "pikachu" }, options); in TEST_F()
766 options = OptionsForLogIterTest(); in TEST_F()
767 options.wal_filter = &test_wal_filter_with_change_batch; in TEST_F()
768 ReopenWithColumnFamilies({ "default", "pikachu" }, options); in TEST_F()
801 options = OptionsForLogIterTest(); in TEST_F()
802 ReopenWithColumnFamilies({ "default", "pikachu" }, options); in TEST_F()
833 Options options = OptionsForLogIterTest(); in TEST_F() local
834 DestroyAndReopen(options); in TEST_F()
835 CreateAndReopenWithCF({ "pikachu" }, options); in TEST_F()
850 options = OptionsForLogIterTest(); in TEST_F()
851 options.wal_filter = &test_wal_filter_extra_keys; in TEST_F()
852 Status status = TryReopenWithColumnFamilies({"default", "pikachu"}, options); in TEST_F()
857 options = OptionsForLogIterTest(); in TEST_F()
858 ReopenWithColumnFamilies({ "default", "pikachu" }, options); in TEST_F()
953 Options options = OptionsForLogIterTest(); in TEST_F() local
954 DestroyAndReopen(options); in TEST_F()
955 CreateAndReopenWithCF({ "pikachu" }, options); in TEST_F()
997 options = OptionsForLogIterTest(); in TEST_F()
998 options.wal_filter = &test_wal_filter_column_families; in TEST_F()
1000 TryReopenWithColumnFamilies({ "default", "pikachu" }, options); in TEST_F()
1048 Options options; in TEST_F() local
1050 options.env = CurrentOptions().env; in TEST_F()
1051 options.allow_concurrent_memtable_write = false; in TEST_F()
1052 options.arena_block_size = kBlockSizeBytes; in TEST_F()
1053 options.create_if_missing = true; in TEST_F()
1054 options.disable_auto_compactions = true; in TEST_F()
1055 options.level0_file_num_compaction_trigger = kNumL0Files; in TEST_F()
1056 options.memtable_factory.reset( in TEST_F()
1058 options.num_levels = 2; in TEST_F()
1059 options.target_file_size_base = kL0FileBytes; in TEST_F()
1060 options.target_file_size_multiplier = 2; in TEST_F()
1061 options.write_buffer_size = kL0FileBytes; in TEST_F()
1084 options.compression = compression_type; in TEST_F()
1099 options.compression_opts.max_dict_bytes = 0; in TEST_F()
1100 options.compression_opts.zstd_max_train_bytes = 0; in TEST_F()
1103 options.compression_opts.max_dict_bytes = kBlockSizeBytes; in TEST_F()
1104 options.compression_opts.zstd_max_train_bytes = 0; in TEST_F()
1110 options.compression_opts.max_dict_bytes = kBlockSizeBytes; in TEST_F()
1111 options.compression_opts.zstd_max_train_bytes = kL0FileBytes; in TEST_F()
1117 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_F()
1118 options.table_factory.reset(NewBlockBasedTableFactory(table_options)); in TEST_F()
1119 CreateAndReopenWithCF({"pikachu"}, options); in TEST_F()
1168 DestroyAndReopen(options); in TEST_F()
1184 Options options = CurrentOptions(); in TEST_F() local
1185 options.compression = kZSTD; in TEST_F()
1186 options.compression_opts.max_dict_bytes = 1 << 14; // 16KB in TEST_F()
1187 options.compression_opts.zstd_max_train_bytes = 1 << 18; // 256KB in TEST_F()
1188 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_F()
1189 options.target_file_size_base = kNumEntriesPerFile * kNumBytesPerEntry; in TEST_F()
1192 options.table_factory.reset(new BlockBasedTableFactory(table_options)); in TEST_F()
1193 Reopen(options); in TEST_F()
1276 Options options = CurrentOptions(); in TEST_F() local
1277 options.level0_file_num_compaction_trigger = 2; in TEST_F()
1278 options.max_bytes_for_level_base = 100; in TEST_F()
1279 options.max_bytes_for_level_multiplier = 2; in TEST_F()
1280 options.num_levels = 7; in TEST_F()
1281 options.max_background_compactions = 1; in TEST_F()
1284 new CompactionCompressionListener(&options); in TEST_F()
1285 options.listeners.emplace_back(listener); in TEST_F()
1297 options.compression_per_level = {kNoCompression, kNoCompression, in TEST_F()
1301 options.compression = kNoCompression; in TEST_F()
1302 options.bottommost_compression = kZlibCompression; in TEST_F()
1305 options.compression_per_level = {}; in TEST_F()
1306 options.compression = kSnappyCompression; in TEST_F()
1307 options.bottommost_compression = kZlibCompression; in TEST_F()
1310 options.compression_per_level = {}; in TEST_F()
1311 options.compression = kSnappyCompression; in TEST_F()
1312 options.bottommost_compression = kDisableCompressionOption; in TEST_F()
1315 DestroyAndReopen(options); in TEST_F()
1363 Options options = CurrentOptions(); in TEST_F() local
1364 options.level0_file_num_compaction_trigger = 4; in TEST_F()
1365 options.max_background_compactions = 40; in TEST_F()
1367 options.listeners.emplace_back(listener); in TEST_F()
1368 DestroyAndReopen(options); in TEST_F()
1409 options.level0_file_num_compaction_trigger); in TEST_F()
1411 10 - options.level0_file_num_compaction_trigger); in TEST_F()
1420 Options options; in TEST_F() local
1421 options.write_buffer_size = 100000; // Small write buffer in TEST_F()
1422 options = CurrentOptions(options); in TEST_F()
1423 CreateAndReopenWithCF({"pikachu"}, options); in TEST_F()
1436 Options options; in TEST_F() local
1437 options = CurrentOptions(options); in TEST_F()
1478 void CreateTwoLevels(Options* options, bool close_afterwards) { in CreateTwoLevels() argument
1480 options->max_open_files = -1; in CreateTwoLevels()
1482 options->create_if_missing = true; in CreateTwoLevels()
1483 options->statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in CreateTwoLevels()
1488 options->table_factory.reset(new BlockBasedTableFactory(table_options)); in CreateTwoLevels()
1489 CreateAndReopenWithCF({"pikachu"}, *options); in CreateTwoLevels()
1499 options->table_factory.reset(NewBlockBasedTableFactory(table_options)); in CreateTwoLevels()
1500 TryReopenWithColumnFamilies({"default", "pikachu"}, *options); in CreateTwoLevels()
1518 Options options = CurrentOptions(); in TEST_P() local
1520 options.max_open_files = -1; in TEST_P()
1522 options.create_if_missing = true; in TEST_P()
1523 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_P()
1528 options.table_factory.reset(new BlockBasedTableFactory(table_options)); in TEST_P()
1529 CreateAndReopenWithCF({"pikachu"}, options); in TEST_P()
1536 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_P()
1537 ASSERT_EQ(0, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT)); in TEST_P()
1538 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_P()
1539 ASSERT_EQ(0, TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT)); in TEST_P()
1542 ASSERT_EQ(2, TestGetTickerCount(options, BLOCK_CACHE_ADD)); in TEST_P()
1543 ASSERT_EQ(0, TestGetTickerCount(options, BLOCK_CACHE_DATA_MISS)); in TEST_P()
1548 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_P()
1549 ASSERT_EQ(0, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT)); in TEST_P()
1550 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_P()
1551 ASSERT_EQ(0, TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT)); in TEST_P()
1555 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_P()
1556 ASSERT_EQ(0, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT)); in TEST_P()
1557 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_P()
1558 ASSERT_EQ(0, TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT)); in TEST_P()
1563 Options options = CurrentOptions(); in TEST_P() local
1564 PinL0IndexAndFilterBlocksTest::CreateTwoLevels(&options, false); in TEST_P()
1566 uint64_t fm = TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS); in TEST_P()
1567 uint64_t fh = TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT); in TEST_P()
1568 uint64_t im = TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS); in TEST_P()
1569 uint64_t ih = TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT); in TEST_P()
1575 ASSERT_EQ(fm, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_P()
1576 ASSERT_EQ(fh, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT)); in TEST_P()
1577 ASSERT_EQ(im, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_P()
1578 ASSERT_EQ(ih, TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT)); in TEST_P()
1587 ASSERT_EQ(fm + 1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_P()
1588 ASSERT_EQ(im + 1, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_P()
1592 Options options = CurrentOptions(); in TEST_P() local
1596 PinL0IndexAndFilterBlocksTest::CreateTwoLevels(&options, close_afterwards); in TEST_P()
1599 uint64_t fm = TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS); in TEST_P()
1600 uint64_t fh = TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT); in TEST_P()
1601 uint64_t im = TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS); in TEST_P()
1602 uint64_t ih = TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT); in TEST_P()
1607 options.max_open_files = 13; in TEST_P()
1620 TryReopenWithColumnFamilies({"default", "pikachu"}, options); in TEST_P()
1627 ASSERT_EQ(fm + 1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_P()
1628 ASSERT_EQ(fh, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT)); in TEST_P()
1629 ASSERT_EQ(im + 1, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_P()
1630 ASSERT_EQ(ih, TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT)); in TEST_P()
1634 ASSERT_EQ(fm, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_P()
1635 ASSERT_EQ(fh, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT)); in TEST_P()
1636 ASSERT_EQ(im, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_P()
1637 ASSERT_EQ(ih, TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT)); in TEST_P()
1645 ASSERT_EQ(fm + 1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_P()
1646 ASSERT_EQ(fh, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT)); in TEST_P()
1647 ASSERT_EQ(im + 1, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_P()
1648 ASSERT_EQ(ih, TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT)); in TEST_P()
1655 ASSERT_EQ(fm + 2, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_P()
1656 ASSERT_EQ(fh, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT)); in TEST_P()
1657 ASSERT_EQ(im + 2, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_P()
1658 ASSERT_EQ(ih, TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT)); in TEST_P()
1665 ASSERT_EQ(fm + 2, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_P()
1666 ASSERT_EQ(fh + 1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT)); in TEST_P()
1667 ASSERT_EQ(im + 2, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_P()
1668 ASSERT_EQ(ih + 1, TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT)); in TEST_P()
1678 ASSERT_EQ(fm + 3, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_P()
1679 ASSERT_EQ(fh, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT)); in TEST_P()
1680 ASSERT_EQ(im + 3, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_P()
1681 ASSERT_EQ(ih + 3, TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT)); in TEST_P()
1683 ASSERT_EQ(fm + 3, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_P()
1684 ASSERT_EQ(fh + 1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT)); in TEST_P()
1685 ASSERT_EQ(im + 3, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_P()
1686 ASSERT_EQ(ih + 4, TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT)); in TEST_P()
1692 ASSERT_EQ(fm + 3, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_P()
1693 ASSERT_EQ(fh + 1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT)); in TEST_P()
1694 ASSERT_EQ(im + 3, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_P()
1695 ASSERT_EQ(ih + 4, TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT)); in TEST_P()
1697 ASSERT_EQ(fm + 3, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_P()
1698 ASSERT_EQ(fh + 2, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT)); in TEST_P()
1699 ASSERT_EQ(im + 3, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_P()
1700 ASSERT_EQ(ih + 5, TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT)); in TEST_P()
1712 Options options = CurrentOptions(); in TEST_F() local
1713 options.memtable_factory.reset( in TEST_F()
1715 options.compaction_style = kCompactionStyleLevel; in TEST_F()
1716 options.write_buffer_size = 200 << 10; in TEST_F()
1717 options.arena_block_size = 4 << 10; in TEST_F()
1718 options.level0_file_num_compaction_trigger = 4; in TEST_F()
1719 options.num_levels = 4; in TEST_F()
1720 options.compression = kNoCompression; in TEST_F()
1721 options.max_bytes_for_level_base = 450 << 10; in TEST_F()
1722 options.target_file_size_base = 100 << 10; in TEST_F()
1724 options.max_compaction_bytes = options.target_file_size_base * 100; in TEST_F()
1726 Reopen(options); in TEST_F()
1740 options.max_compaction_bytes = options.target_file_size_base * 3; in TEST_F()
1741 Reopen(options); in TEST_F()
1952 Options options; in TEST_F() local
1953 options.write_buffer_size = 64 * 1024; // small write buffer in TEST_F()
1954 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_F()
1955 options = CurrentOptions(options); in TEST_F()
1967 options.table_factory.reset(NewBlockBasedTableFactory(table_options)); in TEST_F()
1969 DestroyAndReopen(options); in TEST_F()
1970 CreateAndReopenWithCF({"pikachu"}, options); in TEST_F()
1973 no_block_cache_opts.statistics = options.statistics; in TEST_F()
1981 std::vector<Options>({no_block_cache_opts, options})); in TEST_F()
2004 auto hit = options.statistics->getTickerCount(PERSISTENT_CACHE_HIT); in TEST_F()
2005 auto miss = options.statistics->getTickerCount(PERSISTENT_CACHE_MISS); in TEST_F()
2072 Options options = CurrentOptions(); in TEST_F() local
2081 options.table_factory.reset(NewBlockBasedTableFactory(bbto)); in TEST_F()
2082 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_F()
2083 DestroyAndReopen(options); in TEST_F()
2094 Reopen(options); in TEST_F()
2115 options.statistics->getTickerCount(READ_AMP_TOTAL_READ_BYTES); in TEST_F()
2118 static_cast<double>(options.statistics->getTickerCount( in TEST_F()
2120 options.statistics->getTickerCount(READ_AMP_TOTAL_READ_BYTES); in TEST_F()
2138 options.statistics->getTickerCount(READ_AMP_ESTIMATE_USEFUL_BYTES), in TEST_F()
2139 options.statistics->getTickerCount(READ_AMP_TOTAL_READ_BYTES)); in TEST_F()
2142 options.statistics->getTickerCount(READ_AMP_ESTIMATE_USEFUL_BYTES) * in TEST_F()
2144 options.statistics->getTickerCount(READ_AMP_TOTAL_READ_BYTES), in TEST_F()
2181 Options options = CurrentOptions(); in TEST_F() local
2188 options.table_factory.reset(NewBlockBasedTableFactory(bbto)); in TEST_F()
2189 options.statistics = stats; in TEST_F()
2190 DestroyAndReopen(options); in TEST_F()
2201 Reopen(options); in TEST_F()
2221 options.statistics->getTickerCount(READ_AMP_ESTIMATE_USEFUL_BYTES); in TEST_F()
2223 options.statistics->getTickerCount(READ_AMP_TOTAL_READ_BYTES); in TEST_F()
2229 options.statistics.reset(); in TEST_F()
2231 options.statistics = new_statistics; in TEST_F()
2232 Reopen(options); in TEST_F()
2249 options.statistics->getTickerCount(READ_AMP_ESTIMATE_USEFUL_BYTES); in TEST_F()
2251 options.statistics->getTickerCount(READ_AMP_TOTAL_READ_BYTES); in TEST_F()
2269 Options options = CurrentOptions(); in TEST_F() local
2270 options.num_levels = 3; in TEST_F()
2271 options.IncreaseParallelism(20); in TEST_F()
2272 DestroyAndReopen(options); in TEST_F()
2343 Options options = CurrentOptions(); in TEST_F() local
2344 options.num_levels = 2; in TEST_F()
2345 options.IncreaseParallelism(20); in TEST_F()
2346 options.disable_auto_compactions = true; in TEST_F()
2347 DestroyAndReopen(options); in TEST_F()
2411 Options options = CurrentOptions(); in TEST_F() local
2412 options.disable_auto_compactions = true; in TEST_F()
2413 options.num_levels = 7; in TEST_F()
2415 DestroyAndReopen(options); in TEST_F()
2487 Options options = CurrentOptions(); in TEST_F() local
2488 options.level0_file_num_compaction_trigger = 2; in TEST_F()
2489 options.disable_auto_compactions = false; in TEST_F()
2491 DestroyAndReopen(options); in TEST_F()
2511 Options options = CurrentOptions(); in TEST_F() local
2512 options.disable_auto_compactions = true; in TEST_F()
2513 options.num_levels = 7; in TEST_F()
2517 for (int i = 0; i < options.num_levels; i++) { in TEST_F()
2518 for (int j = 0; j < options.num_levels - i + 1; j++) { in TEST_F()
2525 for (int l = 1; l < options.num_levels - i; l++) { in TEST_F()
2531 DestroyAndReopen(options); in TEST_F()
2565 Options options = CurrentOptions(); in TEST_F() local
2566 options.disable_auto_compactions = true; in TEST_F()
2567 options.num_levels = 7; in TEST_F()
2571 for (int i = 0; i < options.num_levels; i++) { in TEST_F()
2572 for (int j = 0; j < options.num_levels - i + 1; j++) { in TEST_F()
2579 for (int l = 1; l < options.num_levels - i; l++) { in TEST_F()
2585 DestroyAndReopen(options); in TEST_F()
2621 Options options = CurrentOptions(); in TEST_F() local
2623 options.OptimizeForPointLookup(2); in TEST_F()
2624 ASSERT_OK(DB::Open(options, dbname_, &db_)); in TEST_F()
2633 Options options = CurrentOptions(); in TEST_F() local
2635 options.OptimizeForSmallDb(); in TEST_F()
2639 std::string(options.table_factory->Name())); in TEST_F()
2642 options.table_factory->GetOptions()); in TEST_F()
2647 ASSERT_OK(DB::Open(options, dbname_, &db_)); in TEST_F()
2719 Options options = CurrentOptions(); in TEST_F() local
2720 options.use_direct_reads = options.use_direct_io_for_flush_and_compaction = in TEST_F()
2722 options.allow_mmap_reads = options.allow_mmap_writes = false; in TEST_F()
2723 DestroyAndReopen(options); in TEST_F()
2734 Reopen(options); in TEST_F()
2738 Options options = CurrentOptions(); in TEST_F() local
2739 CreateAndReopenWithCF({"pikachu"}, options); in TEST_F()
2802 Options options = CurrentOptions(); in TEST_F() local
2804 options.level0_file_num_compaction_trigger = 4; in TEST_F()
2805 options.level0_slowdown_writes_trigger = 12; in TEST_F()
2806 options.level0_stop_writes_trigger = 30; in TEST_F()
2807 options.delayed_write_rate = 8 * 1024 * 1024; in TEST_F()
2808 Reopen(options); in TEST_F()
2862 Options options = CurrentOptions(); in TEST_F() local
2863 options.compression = kNoCompression; in TEST_F()
2864 options.level0_file_num_compaction_trigger = kNumL0Files; in TEST_F()
2865 options.memtable_factory.reset(new SpecialSkipListFactory(kNumKeysPerFile)); in TEST_F()
2866 options.new_table_reader_for_compaction_inputs = true; in TEST_F()
2870 options.rate_limiter.reset(NewGenericRateLimiter( in TEST_F()
2875 options.use_direct_reads = options.use_direct_io_for_flush_and_compaction = in TEST_F()
2880 options.table_factory.reset(new BlockBasedTableFactory(bbto)); in TEST_F()
2881 DestroyAndReopen(options); in TEST_F()
2893 ASSERT_EQ(0, options.rate_limiter->GetTotalBytesThrough(Env::IO_HIGH)); in TEST_F()
2897 options.rate_limiter->GetTotalBytesThrough(Env::IO_LOW); in TEST_F()
2916 options.rate_limiter->GetTotalBytesThrough(Env::IO_LOW))); in TEST_F()
2924 Options options; in TEST_F() local
2925 options.disable_auto_compactions = true; in TEST_F()
2926 options.num_levels = 7; in TEST_F()
2927 Reopen(options); in TEST_F()
2941 options.num_levels = 3; in TEST_F()
2942 Reopen(options); in TEST_F()
2950 Options options; in TEST_F() local
2951 options.disable_auto_compactions = true; in TEST_F()
2952 options.num_levels = 7; in TEST_F()
2953 Reopen(options); in TEST_F()
3085 Options options = CurrentOptions(); in TEST_F() local
3089 options.table_factory.reset(NewBlockBasedTableFactory(table_options)); in TEST_F()
3090 Reopen(options); in TEST_F()
3140 Options options = CurrentOptions(); in TEST_F() local
3141 options.merge_operator = MergeOperators::CreatePutOperator(); in TEST_F()
3146 CreateAndReopenWithCF({"pikachu"}, options); in TEST_F()
3191 ASSERT_OK(DestroyDB(dbname2, options)); in TEST_F()
3196 options.create_if_missing = true; in TEST_F()
3197 ASSERT_OK(DB::Open(options, dbname2, &db2_init)); in TEST_F()
3240 ASSERT_OK(DestroyDB(dbname2, options)); in TEST_F()
3244 Options options = CurrentOptions(); in TEST_F() local
3245 options.merge_operator = MergeOperators::CreatePutOperator(); in TEST_F()
3250 CreateAndReopenWithCF({"pikachu"}, options); in TEST_F()
3266 ASSERT_OK(DestroyDB(dbname2, options)); in TEST_F()
3271 options.create_if_missing = true; in TEST_F()
3272 ASSERT_OK(DB::Open(options, dbname2, &db2_init)); in TEST_F()
3308 ASSERT_OK(DestroyDB(dbname2, options)); in TEST_F()
3312 Options options = CurrentOptions(); in TEST_F() local
3317 CreateAndReopenWithCF({"pikachu"}, options); in TEST_F()
3335 ASSERT_OK(DestroyDB(dbname2, options)); in TEST_F()
3340 options.create_if_missing = true; in TEST_F()
3341 ASSERT_OK(DB::Open(options, dbname2, &db2_init)); in TEST_F()
3379 ASSERT_OK(DestroyDB(dbname2, options)); in TEST_F()
3383 Options options = CurrentOptions(); in TEST_F() local
3384 options.merge_operator = MergeOperators::CreatePutOperator(); in TEST_F()
3389 CreateAndReopenWithCF({"pikachu"}, options); in TEST_F()
3434 ASSERT_OK(DestroyDB(dbname2, options)); in TEST_F()
3439 options.create_if_missing = true; in TEST_F()
3440 ASSERT_OK(DB::Open(options, dbname2, &db2_init)); in TEST_F()
3479 ASSERT_OK(DestroyDB(dbname2, options)); in TEST_F()
3483 ASSERT_OK(DestroyDB(dbname3, options)); in TEST_F()
3486 options.create_if_missing = true; in TEST_F()
3488 ASSERT_OK(DB::Open(options, dbname3, &db3_init)); in TEST_F()
3531 ASSERT_OK(DestroyDB(dbname3, options)); in TEST_F()
3556 Options options = CurrentOptions(); in TEST_F() local
3557 options.allow_mmap_reads = true; in TEST_F()
3558 options.max_open_files = 100; in TEST_F()
3559 options.compression = kNoCompression; in TEST_F()
3560 Reopen(options); in TEST_F()
3583 ASSERT_OK(ReadOnlyReopen(options)); in TEST_F()
3592 options.max_open_files = -1; in TEST_F()
3593 ASSERT_OK(ReadOnlyReopen(options)); in TEST_F()
3601 Options options = CurrentOptions(); in TEST_F() local
3602 options.create_if_missing = true; in TEST_F()
3603 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_F()
3609 options.table_factory.reset(new BlockBasedTableFactory(bbto)); in TEST_F()
3610 Reopen(options); in TEST_F()
3755 Options options = CurrentOptions(); in TEST_F() local
3756 options.max_file_opening_threads = 1; // one thread in TEST_F()
3759 options.table_factory.reset(NewBlockBasedTableFactory(table_options)); in TEST_F()
3760 options.max_open_files = -1; in TEST_F()
3761 Reopen(options); in TEST_F()
3775 options.max_file_opening_threads = 16; in TEST_F()
3776 Reopen(options); in TEST_F()
3834 Options options; in TEST_F() local
3835 options.num_levels = 2; in TEST_F()
3836 options.disable_auto_compactions = true; in TEST_F()
3837 Reopen(options); in TEST_F()
3842 ROCKSDB_NAMESPACE::EnvOptions(), options}; in TEST_F()
3890 Options options = CurrentOptions(); in TEST_F() local
3894 ASSERT_OK(DestroyDB(dbnames.back(), options)); in TEST_F()
3900 options.create_if_missing = true; in TEST_F()
3904 ASSERT_OK(DB::Open(options, dbnames[dbnum], &dbs[dbnum])); in TEST_F()
3923 ASSERT_OK(DB::Open(options, dbnames[dbnum], &dbs[dbnum])); in TEST_F()
3932 ASSERT_OK(DestroyDB(dbnames[i], options)); in TEST_F()
3967 Options options = CurrentOptions(); in TEST_F() local
3968 options.create_if_missing = true; in TEST_F()
3969 options.statistics = stats; in TEST_F()
3970 Reopen(options); in TEST_F()
3997 Options options = CurrentOptions(); in TEST_F() local
3998 options.create_if_missing = true; in TEST_F()
3999 options.prefix_extractor.reset(NewCappedPrefixTransform(3)); in TEST_F()
4003 options.table_factory.reset(NewBlockBasedTableFactory(bbto)); in TEST_F()
4004 DestroyAndReopen(options); in TEST_F()
4037 Options options = CurrentOptions(); in TEST_F() local
4038 options.create_if_missing = true; in TEST_F()
4039 options.prefix_extractor.reset(NewCappedPrefixTransform(3)); in TEST_F()
4043 options.table_factory.reset(NewBlockBasedTableFactory(bbto)); in TEST_F()
4044 DestroyAndReopen(options); in TEST_F()
4072 Options options = CurrentOptions(); in TEST_F() local
4073 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_F()
4074 options.row_cache = NewLRUCache(8 * 8192); in TEST_F()
4075 DestroyAndReopen(options); in TEST_F()
4089 ASSERT_EQ(TestGetTickerCount(options, ROW_CACHE_HIT), 0); in TEST_F()
4090 ASSERT_EQ(TestGetTickerCount(options, ROW_CACHE_MISS), 0); in TEST_F()
4092 ASSERT_EQ(TestGetTickerCount(options, ROW_CACHE_HIT), 0); in TEST_F()
4093 ASSERT_EQ(TestGetTickerCount(options, ROW_CACHE_MISS), 1); in TEST_F()
4095 ASSERT_EQ(TestGetTickerCount(options, ROW_CACHE_HIT), 1); in TEST_F()
4096 ASSERT_EQ(TestGetTickerCount(options, ROW_CACHE_MISS), 1); in TEST_F()
4098 ASSERT_EQ(TestGetTickerCount(options, ROW_CACHE_HIT), 1); in TEST_F()
4099 ASSERT_EQ(TestGetTickerCount(options, ROW_CACHE_MISS), 2); in TEST_F()
4101 ASSERT_EQ(TestGetTickerCount(options, ROW_CACHE_HIT), 2); in TEST_F()
4102 ASSERT_EQ(TestGetTickerCount(options, ROW_CACHE_MISS), 2); in TEST_F()
4104 ASSERT_EQ(TestGetTickerCount(options, ROW_CACHE_HIT), 3); in TEST_F()
4105 ASSERT_EQ(TestGetTickerCount(options, ROW_CACHE_MISS), 2); in TEST_F()
4107 ASSERT_EQ(TestGetTickerCount(options, ROW_CACHE_HIT), 4); in TEST_F()
4108 ASSERT_EQ(TestGetTickerCount(options, ROW_CACHE_MISS), 2); in TEST_F()
4127 Options options = CurrentOptions(); in TEST_F() local
4129 DestroyAndReopen(options); in TEST_F()
4130 options.create_if_missing = true; in TEST_F()
4131 options.wal_recovery_mode = WALRecoveryMode::kPointInTimeRecovery; in TEST_F()
4132 CreateAndReopenWithCF({"pikachu"}, options); in TEST_F()
4164 FaultInjectionTestEnv fit_env(options.env); in TEST_F()
4165 options.env = &fit_env; in TEST_F()
4172 {kDefaultColumnFamilyName, "pikachu"}, options)); in TEST_F()
4179 options.env = env_; in TEST_F()
4181 options)); in TEST_F()
4186 Options options = CurrentOptions(); in TEST_F() local
4187 options.prefix_extractor.reset(NewCappedPrefixTransform(1)); in TEST_F()
4188 options.num_levels = 3; in TEST_F()
4189 DestroyAndReopen(options); in TEST_F()
4219 Options options = CurrentOptions(); in TEST_F() local
4220 options.write_buffer_manager = in TEST_F()
4222 options.avoid_unnecessary_blocking_io = true; in TEST_F()
4223 DestroyAndReopen(options); in TEST_F()
4224 size_t base_value = options.write_buffer_manager->memory_usage(); in TEST_F()
4229 size_t value = options.write_buffer_manager->memory_usage(); in TEST_F()
4239 value = options.write_buffer_manager->memory_usage(); in TEST_F()
4251 value = options.write_buffer_manager->memory_usage(); in TEST_F()
4256 Options options = CurrentOptions(); in TEST_F() local
4257 DestroyAndReopen(options); in TEST_F()
4258 options.max_manifest_file_size = 10; in TEST_F()
4259 options.create_if_missing = true; in TEST_F()
4260 CreateAndReopenWithCF({"pikachu"}, options); in TEST_F()
4264 const int kL0Files = options.level0_file_num_compaction_trigger; in TEST_F()
4278 Options options = CurrentOptions(); in TEST_F() local
4279 options.merge_operator = MergeOperators::CreateStringAppendOperator(); in TEST_F()
4280 DestroyAndReopen(options); in TEST_F()
4312 Options options = CurrentOptions(); in TEST_F() local
4317 options.table_factory.reset(NewBlockBasedTableFactory(table_options)); in TEST_F()
4318 options.prefix_extractor.reset(NewFixedPrefixTransform(1)); in TEST_F()
4320 Reopen(options); in TEST_F()
4374 Options options = CurrentOptions(); in TEST_F() local
4390 options.table_factory.reset(NewBlockBasedTableFactory(table_options)); in TEST_F()
4391 options.statistics = CreateDBStatistics(); in TEST_F()
4393 options.prefix_extractor.reset(NewFixedPrefixTransform(2)); in TEST_F()
4394 DestroyAndReopen(options); in TEST_F()
4408 options.prefix_extractor.reset(NewFixedPrefixTransform(1)); in TEST_F()
4409 Reopen(options); in TEST_F()
4419 ASSERT_EQ(0, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4426 ASSERT_EQ(0, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4443 ASSERT_EQ(0, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4456 ASSERT_EQ(0, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4463 ASSERT_EQ(1, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4481 ASSERT_EQ(2, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4488 ASSERT_EQ(3, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4495 ASSERT_EQ(4, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4505 ASSERT_EQ(5, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4512 ASSERT_EQ(6, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4524 ASSERT_EQ(7, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4533 Options options = CurrentOptions(); in TEST_F() local
4538 options.table_factory.reset(NewBlockBasedTableFactory(table_options)); in TEST_F()
4539 options.prefix_extractor.reset(NewFixedPrefixTransform(1)); in TEST_F()
4540 options.level0_file_num_compaction_trigger = 8; in TEST_F()
4542 Reopen(options); in TEST_F()
4576 Options options = CurrentOptions(); in TEST_F() local
4578 options.table_factory.reset(NewBlockBasedTableFactory(table_options)); in TEST_F()
4579 options.prefix_extractor.reset(NewFixedPrefixTransform(1)); in TEST_F()
4580 options.statistics = CreateDBStatistics(); in TEST_F()
4582 Reopen(options); in TEST_F()
4600 ASSERT_EQ(0, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4611 ASSERT_EQ(1, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4621 ASSERT_EQ(1, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4630 ASSERT_EQ(2, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4642 ASSERT_EQ(3, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4650 ASSERT_EQ(3, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4657 ASSERT_EQ(4, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()
4665 ASSERT_EQ(4, TestGetTickerCount(options, BLOOM_FILTER_PREFIX_CHECKED)); in TEST_F()