From f9e2a9a086851ad263bd2097938ee5491dfd0f5d Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 6 Dec 2015 16:32:22 +0200 Subject: [PATCH] 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. --- mutation_partition.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mutation_partition.cc b/mutation_partition.cc index 423ab706cf..30eabc8de2 100644 --- a/mutation_partition.cc +++ b/mutation_partition.cc @@ -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(def.type); old = ct->merge(old.as_collection_mutation(), neww.as_collection_mutation()); } + old.unlinearize(); } void