diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2024-02-05 15:17:25 -0500 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2024-02-05 15:17:25 -0500 |
| commit | db4806d9dd9757273a14e6c3ea92e5a087239145 (patch) | |
| tree | 3766b79180d9d3b2167b0ff8d74cd9e73bfc5298 /include/framework | |
| parent | fca660859bd8133cff53592b17abf4c8a51fc2c0 (diff) | |
| download | dynamic-extension-db4806d9dd9757273a14e6c3ea92e5a087239145.tar.gz | |
Set up tombstone deletes properly
Diffstat (limited to 'include/framework')
| -rw-r--r-- | include/framework/DynamicExtension.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/framework/DynamicExtension.h b/include/framework/DynamicExtension.h index a56cc6c..3e9d0fb 100644 --- a/include/framework/DynamicExtension.h +++ b/include/framework/DynamicExtension.h @@ -481,7 +481,7 @@ private: void *parms = args->query_parms; /* Get the buffer query states */ - void *buffer_state = Q::get_buffer_query_state(std::move(buffer), parms); + void *buffer_state = Q::get_buffer_query_state(&buffer, parms); /* Get the shard query states */ std::vector<std::pair<ShardID, Shard*>> shards; @@ -502,7 +502,7 @@ private: shid = shards[i - 1].first; } - query_results[i] = std::move(filter_deletes(local_results, shid, vers)); + query_results[i] = std::move(filter_deletes(local_results, shid, vers, &buffer)); if constexpr (Q::EARLY_ABORT) { if (query_results[i].size() > 0) break; @@ -563,8 +563,8 @@ private: return m_buffer->append(rec, ts); } - static std::vector<Wrapped<R>> filter_deletes(std::vector<Wrapped<R>> &records, ShardID shid, Structure *vers) { - if constexpr (!Q::SKIP_DELETE_FILTER) { + static std::vector<Wrapped<R>> filter_deletes(std::vector<Wrapped<R>> &records, ShardID shid, Structure *vers, BufView *bview) { + if constexpr (Q::SKIP_DELETE_FILTER) { return records; } @@ -602,6 +602,12 @@ private: //continue; //} + for (size_t i=0; i<bview->get_record_count(); i++) { + if (bview->get(i)->is_tombstone() && bview->get(i)->rec == rec.rec) { + continue; + } + } + if (shid != INVALID_SHID) { for (size_t lvl=0; lvl<=shid.level_idx; lvl++) { if (vers->get_levels()[lvl]->check_tombstone(0, rec.rec)) { |