diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2024-05-08 13:20:44 -0400 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2024-05-08 13:20:44 -0400 |
| commit | a23bc3341923509be9b2f587ece8cd5a650f6386 (patch) | |
| tree | bd6fef5e173d7192d11dfccbf89d178a7d9dc05d /include | |
| parent | 01729c8772f3e25bce18f0b1fbfeee308b4c4d9f (diff) | |
| download | dynamic-extension-a23bc3341923509be9b2f587ece8cd5a650f6386.tar.gz | |
TSParmsweep: enabled forcing a full buffer scan
Diffstat (limited to 'include')
| -rw-r--r-- | include/framework/structure/BufferView.h | 6 | ||||
| -rw-r--r-- | include/query/rangecount.h | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/include/framework/structure/BufferView.h b/include/framework/structure/BufferView.h index 44a2044..11b8337 100644 --- a/include/framework/structure/BufferView.h +++ b/include/framework/structure/BufferView.h @@ -112,6 +112,10 @@ public: size_t get_record_count() { return m_tail - m_head; } + + size_t get_capacity() { + return m_cap; + } /* * NOTE: This function returns an upper bound on the number @@ -123,7 +127,7 @@ public: } Wrapped<R> *get(size_t i) { - assert(i < get_record_count()); + //assert(i < get_record_count()); return m_data + to_idx(i); } 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()) { |