summaryrefslogtreecommitdiffstats
path: root/include/query
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2024-05-08 13:20:44 -0400
committerDouglas Rumbaugh <dbr4@psu.edu>2024-05-08 13:20:44 -0400
commita23bc3341923509be9b2f587ece8cd5a650f6386 (patch)
treebd6fef5e173d7192d11dfccbf89d178a7d9dc05d /include/query
parent01729c8772f3e25bce18f0b1fbfeee308b4c4d9f (diff)
downloaddynamic-extension-a23bc3341923509be9b2f587ece8cd5a650f6386.tar.gz
TSParmsweep: enabled forcing a full buffer scan
Diffstat (limited to 'include/query')
-rw-r--r--include/query/rangecount.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/query/rangecount.h b/include/query/rangecount.h
index 5a18ed4..5b95cdd 100644
--- a/include/query/rangecount.h
+++ b/include/query/rangecount.h
@@ -35,7 +35,7 @@ struct BufferState {
: buffer(buffer) {}
};
-template <KVPInterface R, ShardInterface<R> S>
+template <KVPInterface R, ShardInterface<R> S, bool FORCE_SCAN=false>
class Query {
public:
constexpr static bool EARLY_ABORT=false;
@@ -119,8 +119,16 @@ public:
res.rec.value = 0; // tombstones
records.emplace_back(res);
+ size_t stop_idx;
+ if constexpr (FORCE_SCAN) {
+ stop_idx = s->buffer->get_capacity() / 2;
+ } else {
+ stop_idx = s->buffer->get_record_count();
+ }
+
for (size_t i=0; i<s->buffer->get_record_count(); i++) {
auto rec = s->buffer->get(i);
+
if (rec->rec.key >= p->lower_bound && rec->rec.key <= p->upper_bound
&& !rec->is_deleted()) {
if (rec->is_tombstone()) {