diff --git a/fdbclient/include/fdbclient/KeyBackedTypes.h b/fdbclient/include/fdbclient/KeyBackedTypes.h index cb86aef2c9..7446d52484 100644 --- a/fdbclient/include/fdbclient/KeyBackedTypes.h +++ b/fdbclient/include/fdbclient/KeyBackedTypes.h @@ -168,7 +168,6 @@ template struct KeyBackedRangeResult { std::vector results; bool more; - Optional readThrough; }; // Convenient read/write access to a single value of type T stored at key @@ -369,7 +368,6 @@ public: rangeResult.results.push_back(PairType(key, val)); } rangeResult.more = kvs.more; - rangeResult.readThrough = kvs.readThrough; return rangeResult; })); } @@ -575,7 +573,6 @@ public: rangeResult.results.push_back(PairType(key, val)); } rangeResult.more = kvs.more; - rangeResult.readThrough = kvs.readThrough; return rangeResult; })); } @@ -663,7 +660,6 @@ public: rangeResult.results.push_back(Codec::unpack(kvs[i].key.removePrefix(prefix))); } rangeResult.more = kvs.more; - rangeResult.readThrough = kvs.readThrough; return rangeResult; })); } diff --git a/fdbclient/include/fdbclient/MetaclusterManagement.actor.h b/fdbclient/include/fdbclient/MetaclusterManagement.actor.h index 941cc1338e..f8467d7e8c 100644 --- a/fdbclient/include/fdbclient/MetaclusterManagement.actor.h +++ b/fdbclient/include/fdbclient/MetaclusterManagement.actor.h @@ -1589,7 +1589,8 @@ Future>> listTenants( tr->setOption(FDBTransactionOptions::RAW_ACCESS); state KeyBackedRangeResult> results = - wait(ManagementClusterMetadata::tenantMetadata().tenantMap.getRange(tr, begin, end, limit)); + wait(ManagementClusterMetadata::tenantMetadata().tenantMap.getRange( + tr, begin, end, std::max(limit + offset, 100))); state std::vector> filterResults; state int count = 0; loop { @@ -1608,13 +1609,10 @@ Future>> listTenants( if (!results.more) { return filterResults; } - if (results.readThrough.present()) { - begin = results.readThrough.get(); - } else { - begin = keyAfter(results.results.back().first); - } + begin = keyAfter(results.results.back().first); wait(store(results, - ManagementClusterMetadata::tenantMetadata().tenantMap.getRange(tr, begin, end, limit))); + ManagementClusterMetadata::tenantMetadata().tenantMap.getRange( + tr, begin, end, std::max(limit + offset, 100)))); } } catch (Error& e) { wait(safeThreadFutureToFuture(tr->onError(e)));