mirror of https://github.com/facebook/rocksdb.git
e82fe7c0b7
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 |
||
---|---|---|
.. | ||
db_wide_basic_test.cc | ||
wide_column_serialization.cc | ||
wide_column_serialization.h | ||
wide_column_serialization_test.cc | ||
wide_columns.cc | ||
wide_columns_helper.cc | ||
wide_columns_helper.h | ||
wide_columns_helper_test.cc |