const omap_root_t &omap_root,
Transaction &t,
const std::optional<std::string> &start,
- size_t max = 128) {
+ size_t max = 128,
+ bool inclusive = false) {
if (start) {
logger().debug("list on {}", *start);
auto config = OMapManager::omap_list_config_t::with_max(max);
config.max_result_size = max;
+ config.inclusive = inclusive;
auto [complete, results] = with_trans_intr(
t,
return omap_manager->omap_list(omap_root, t, start, config);
}).unsafe_get0();
- auto it = start ?
- test_omap_mappings.upper_bound(*start) :
- test_omap_mappings.begin();
+ test_omap_t::iterator it;
+ if (start) {
+ it = config.inclusive ?
+ test_omap_mappings.lower_bound(*start) :
+ test_omap_mappings.upper_bound(*start);
+ } else {
+ it = test_omap_mappings.begin();
+ }
for (auto &&[k, v]: results) {
EXPECT_NE(it, test_omap_mappings.end());
if (it == test_omap_mappings.end())
list(omap_root, *t, temp, 100);
}
+ {
+ auto t = create_read_transaction();
+ list(omap_root, *t, temp, 100, true);
+ }
+
{
auto t = create_mutate_transaction();
clear(omap_root, *t);
list(omap_root, *t, temp, 10240);
}
+ {
+ auto t = create_read_transaction();
+ list(omap_root, *t, temp, 10240, true);
+ }
+
{
auto t = create_mutate_transaction();
clear(omap_root, *t);