Replies: 1 comment 2 replies
-
There are two cases: in-memory version and disk version. For the disk version, I think we aggreed that the storage manager manages this memory/storage object. (It is still open how this object is encapsulated and whether the segment should get a link (pointer/reference) to it, e.g., to know whether it is on disk or in memory). For the in-memory version, it is unclear to me, whether the vector is managed by the segment itself or the storage manger. I think both is possible and it is more a matter of taste. But, we definitely need the vector/array somewhere. For a start, we could keep the vector in the segment, but should ensure that it is empty for disk-based segments and only used via the span for the memory-based version. |
Beta Was this translation helpful? Give feedback.
-
While switching from vector-based storage to std::span-based storage, we currently hold both attributes per data storage class - a vector and a span - to make the switch easier.
Precisely we have:
DictionarySegmentIterable
:_dictionary
anddictionary_span
DictionarySegment
:_dictionary
anddictionary_span
FixedWidthIntegerVector
:data
anddata_span
Ideally, we should at some point be completely span-based, but I am not sure if this achievable. (E.g. when we are first creating objects, which is mostly done by operating on vectors. Should we immediately only store spans on the data of the vectors and would that be memory-safe / would it be possible that the vector is without reference and gets garbage collected thus invalidating our span view on its data?)
This thread is for discussing which attributes to keep or delete.
Beta Was this translation helpful? Give feedback.
All reactions