mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-31 20:16:43 +00:00
mutation_partition: work on linearized atomic_cell_or_mutation objects
Ensure that when we examine atomic_cell_or_mutation objects for merging, that they are contiguous in memory. When we are done we scatter them again.
This commit is contained in:
@@ -607,6 +607,8 @@ void
|
||||
merge_column(const column_definition& def,
|
||||
atomic_cell_or_collection& old,
|
||||
atomic_cell_or_collection&& neww) {
|
||||
old.linearize();
|
||||
neww.linearize();
|
||||
if (def.is_atomic()) {
|
||||
if (compare_atomic_cell_for_merge(old.as_atomic_cell(), neww.as_atomic_cell()) < 0) {
|
||||
old = std::move(neww);
|
||||
@@ -615,6 +617,7 @@ merge_column(const column_definition& def,
|
||||
auto ct = static_pointer_cast<const collection_type_impl>(def.type);
|
||||
old = ct->merge(old.as_collection_mutation(), neww.as_collection_mutation());
|
||||
}
|
||||
old.unlinearize();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user