diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2024-03-22 14:04:58 -0400 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2024-03-22 14:04:58 -0400 |
| commit | 3b7bd57fa2af388b4de41f9b5e58e26b1306d983 (patch) | |
| tree | a1e9cc25a406c39ff105da330d9361f7d3b10c90 /include/framework/structure/MutableBuffer.h | |
| parent | 147f0df58e1ff4973bffb7e4628e6b2fdc20eb57 (diff) | |
| download | dynamic-extension-3b7bd57fa2af388b4de41f9b5e58e26b1306d983.tar.gz | |
MutableBuffer: added visibility flag to records and refactored timestamp
Diffstat (limited to 'include/framework/structure/MutableBuffer.h')
| -rw-r--r-- | include/framework/structure/MutableBuffer.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/framework/structure/MutableBuffer.h b/include/framework/structure/MutableBuffer.h index 1ed0200..7db3980 100644 --- a/include/framework/structure/MutableBuffer.h +++ b/include/framework/structure/MutableBuffer.h @@ -77,16 +77,20 @@ public: wrec.header = 0; if (tombstone) wrec.set_tombstone(); + // FIXME: because of the mod, it isn't correct to use `pos` + // as the ordering timestamp in the header anymore. size_t pos = tail % m_cap; m_data[pos] = wrec; - m_data[pos].header |= (pos << 2); + m_data[pos].set_timestamp(pos); if (tombstone) { m_tscnt.fetch_add(1); if (m_tombstone_filter) m_tombstone_filter->insert(rec); } + m_data[pos].set_visible(); + return 1; } |