rocksdb/db/wide
Levi Tamasi e82fe7c0b7 Fix the move semantics of PinnableWideColumns (#12557)
Summary:
Pull Request resolved: https://github.com/facebook/rocksdb/pull/12557

Unlike for other sequence containers, the C++ standard allows moving an `std::string` to invalidate pointers/iterators/references. In practice, this happens with short strings which are stored "inline" in the `std::string` object (small string optimization). Since `PinnableSlice` uses `std::string` as its internal buffer, and `PinnableWideColumns` in turn is implemented in terms of `PinnableSlice`, this means that the default compiler-generated move operations can invalidate the column index stored in `PinnableWideColumns::columns_`. The PR fixes this by providing custom move constructor/move assignment implementations for `PinnableWideColumns` that recreate the `columns_` index upon move.

Reviewed By: jaykorean

Differential Revision: D56275054

fbshipit-source-id: e8648c003dbcf1c39ec122ad229780c28138e730
2024-04-17 18:56:23 -07:00
..
db_wide_basic_test.cc Fix the move semantics of PinnableWideColumns (#12557) 2024-04-17 18:56:23 -07:00
wide_column_serialization.cc Remove a now-unnecessary WideColumnSerialization::Serialize variant (#11864) 2023-09-20 08:04:35 -07:00
wide_column_serialization.h Remove a now-unnecessary WideColumnSerialization::Serialize variant (#11864) 2023-09-20 08:04:35 -07:00
wide_column_serialization_test.cc Remove a now-unnecessary WideColumnSerialization::Serialize variant (#11864) 2023-09-20 08:04:35 -07:00
wide_columns.cc Fix the move semantics of PinnableWideColumns (#12557) 2024-04-17 18:56:23 -07:00
wide_columns_helper.cc Add a helper method WideColumnsHelper::SortColumns (#11823) 2023-09-12 12:36:07 -07:00
wide_columns_helper.h Fix the handling of wide-column base values in the max_successive_merges logic (#11913) 2023-10-02 16:25:25 -07:00
wide_columns_helper_test.cc Wide Column support in ldb (#11754) 2023-08-30 12:45:52 -07:00