mutation_fragment: allow creating clustering row in place
Moving clustering_row is expensive due to amount of data stored internally. Adding a mutation_fragment constructor that builds a clustering_row in-place saves some of that moving.
This commit is contained in:
committed by
Tomasz Grabiec
parent
dcd79af8ed
commit
b1cb7d214e
@@ -303,6 +303,16 @@ private:
|
||||
|
||||
friend class position_in_partition;
|
||||
public:
|
||||
struct clustering_row_tag_t { };
|
||||
|
||||
template<typename... Args>
|
||||
mutation_fragment(clustering_row_tag_t, Args&&... args)
|
||||
: _kind(kind::clustering_row)
|
||||
, _data(std::make_unique<data>())
|
||||
{
|
||||
new (&_data->_clustering_row) clustering_row(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
mutation_fragment(static_row&& r);
|
||||
mutation_fragment(clustering_row&& r);
|
||||
mutation_fragment(range_tombstone&& r);
|
||||
|
||||
Reference in New Issue
Block a user