diff --git a/mutation_partition.cc b/mutation_partition.cc index 0bd33b7a01..bedaaad094 100644 --- a/mutation_partition.cc +++ b/mutation_partition.cc @@ -4,6 +4,15 @@ #include "mutation_partition.hh" +mutation_partition::mutation_partition(const mutation_partition& x) + : _tombstone(x._tombstone) + , _static_row(x._static_row) + , _rows(x._rows.value_comp()) + , _row_tombstones(x._row_tombstones.value_comp()) { + auto cloner = [] (const auto& x) { return new std::remove_const_t>(x); }; + _rows.clone_from(x._rows, cloner, std::default_delete()); + _row_tombstones.clone_from(x._row_tombstones, cloner, std::default_delete()); +} mutation_partition::~mutation_partition() { _rows.clear_and_dispose(std::default_delete()); diff --git a/mutation_partition.hh b/mutation_partition.hh index 088fe0c8a7..6501b8e981 100644 --- a/mutation_partition.hh +++ b/mutation_partition.hh @@ -149,6 +149,7 @@ class serializer; class mutation_partition final { + // FIXME: using boost::intrusive because gcc's std::set<> does not support heterogeneous lookup yet using rows_type = boost::intrusive::set>; private: tombstone _tombstone; @@ -156,6 +157,7 @@ private: rows_type _rows; // Contains only strict prefixes so that we don't have to lookup full keys // in both _row_tombstones and _rows. + // FIXME: using boost::intrusive because gcc's std::set<> does not support heterogeneous lookup yet boost::intrusive::set> _row_tombstones; template @@ -166,6 +168,7 @@ public: , _row_tombstones(row_tombstones_entry::compare(*s)) { } mutation_partition(mutation_partition&&) = default; + mutation_partition(const mutation_partition&); ~mutation_partition(); tombstone partition_tombstone() const { return _tombstone; } void apply(tombstone t) { _tombstone.apply(t); }