run_async([this] {
omap_root_t omap_root = initialize();
- string temp;
+ string first, last;
for (unsigned i = 0; i < 40; i++) {
auto t = create_mutate_transaction();
logger().debug("opened transaction");
for (unsigned j = 0; j < 10; ++j) {
auto key = set_random_key(omap_root, *t);
- if (i == 10)
- temp = key;
+ if (i == 10) {
+ first = key;
+ }
+ if (i == 30) {
+ last = key;
+ if (first > last) {
+ std::swap(first, last);
+ }
+ }
if ((i % 20 == 0) && (j == 5)) {
check_mappings(omap_root, *t);
}
check_mappings(omap_root);
}
+ std::optional<std::string> first_temp;
+ std::optional<std::string> last_temp;
+ {
+ auto t = create_read_transaction();
+ first_temp = std::nullopt;
+ last_temp = std::nullopt;
+ list(omap_root, *t, first_temp, last_temp);
+ }
+
+ {
+ auto t = create_read_transaction();
+ first_temp = first;
+ last_temp = std::nullopt;
+ list(omap_root, *t, first_temp, last_temp, 100);
+ }
+
{
auto t = create_read_transaction();
- list(omap_root, *t, std::nullopt, std::nullopt);
+ first_temp = first;
+ last_temp = std::nullopt;
+ list(omap_root, *t, first_temp, last_temp, 100, true);
}
{
auto t = create_read_transaction();
- list(omap_root, *t, temp, std::nullopt, 100);
+ first_temp = std::nullopt;
+ last_temp = last;
+ list(omap_root, *t, first_temp, last_temp, 10240);
}
{
auto t = create_read_transaction();
- list(omap_root, *t, temp, std::nullopt, 100, true);
+ first_temp = first;
+ last_temp = last;
+ list(omap_root, *t, first_temp, last_temp, 10240, true);
}
{
run_async([this] {
omap_root_t omap_root = initialize();
- string temp = "";
+ string first = "";
+ string last;
while (cache->get_omap_tree_depth() < 3) {
for (unsigned i = 0; i < 40; i++) {
auto t = create_mutate_transaction();
logger().debug("opened transaction");
for (unsigned j = 0; j < 10; ++j) {
auto key = set_random_key(omap_root, *t);
- if (key.compare(temp) < 0 || !temp.length())
- temp = key;
+ if (key.compare(first) < 0 || !first.length()) {
+ first = key;
+ }
+ if (i == 10) {
+ last = key;
+ }
}
logger().debug("force split submit transaction i = {}", i);
submit_transaction(std::move(t));
}
}
+ std::optional<std::string> first_temp;
+ std::optional<std::string> last_temp;
+ {
+ auto t = create_read_transaction();
+ first_temp = first;
+ last_temp = std::nullopt;
+ list(omap_root, *t, first_temp, last_temp, 10240);
+ }
+
+ {
+ auto t = create_read_transaction();
+ first_temp = first;
+ last_temp = std::nullopt;
+ list(omap_root, *t, first_temp, last_temp, 10240, true);
+ }
+
{
auto t = create_read_transaction();
- list(omap_root, *t, temp, std::nullopt, 10240);
+ first_temp = std::nullopt;
+ last_temp = last;
+ list(omap_root, *t, first_temp, last_temp, 10240);
}
{
auto t = create_read_transaction();
- list(omap_root, *t, temp, std::nullopt, 10240, true);
+ first_temp = first;
+ last_temp = last;
+ list(omap_root, *t, first_temp, last_temp, 10240, true);
}
{