diff --git a/service/storage_proxy.cc b/service/storage_proxy.cc index f2c560dcdf..c605dcd36c 100644 --- a/service/storage_proxy.cc +++ b/service/storage_proxy.cc @@ -171,10 +171,13 @@ public: class shared_mutation : public mutation_holder { lw_shared_ptr _mutation; public: - shared_mutation(const mutation& m) : _mutation(make_lw_shared(freeze(m))) { + explicit shared_mutation(frozen_mutation_and_schema&& fm_a_s) + : _mutation(make_lw_shared(std::move(fm_a_s.fm))) { _size = _mutation->representation().size(); - _schema = m.schema(); - }; + _schema = std::move(fm_a_s.s); + } + explicit shared_mutation(const mutation& m) : shared_mutation(frozen_mutation_and_schema{freeze(m), m.schema()}) { + } lw_shared_ptr get_mutation_for(gms::inet_address ep) override { return _mutation; }