-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
Fully Compatible
The decompressor uses the materializer interface to produce elements of the desired type from compressed data. When a BSONElement is passed to the materializer, it may be an uncompressed element that appeared in the BSONColumn bytes, or it may have already been materialized in the allocator, as when an object is created from a set of interleaved streams.
If the BSONElement is from the BSONColumn bytes, then the element's data pointer may dangle when a yield happens. On the other hand, BSONElements that point to data in the allocator will have a lifetime the same as the allocator. The allocator is reference-counted and the query system will be able to ensure it has a long enough lifetime.
We should update the materializer interface so that it can choose to copy or not, depending on the context. Probably the right approach would be to add a boolean template parameter to the materialize() methods that accept a BSONElement.
- is depended on by
-
SERVER-85256 Update query system to avoid copying when decompressing BSONColumn
-
- Closed
-
- related to
-
SERVER-86372 Avoid materializing BSONElements twice in decompressIterative
-
- Closed
-