db/view: Use view schema for view pk operations
Instead of base schema. Fixes #2504 Signed-off-by: Duarte Nunes <duarte@scylladb.com> Message-Id: <20170718190703.12972-1-duarte@scylladb.com>
This commit is contained in:
committed by
Tomasz Grabiec
parent
bfae5c7bac
commit
115ff1095e
Notes:
Duarte Nunes
2017-11-15 20:43:30 +00:00
backport: 2.0
@@ -194,13 +194,13 @@ public:
|
||||
: _view(std::move(view))
|
||||
, _view_info(*_view->view_info())
|
||||
, _base(std::move(base))
|
||||
, _updates(8, partition_key::hashing(*_base), partition_key::equality(*_base)) {
|
||||
, _updates(8, partition_key::hashing(*_view), partition_key::equality(*_view)) {
|
||||
}
|
||||
|
||||
void move_to(std::vector<mutation>& mutations) && {
|
||||
auto& partitioner = dht::global_partitioner();
|
||||
std::transform(_updates.begin(), _updates.end(), std::back_inserter(mutations), [&, this] (auto&& m) {
|
||||
return mutation(_view, partitioner.decorate_key(*_base, std::move(m.first)), std::move(m.second));
|
||||
return mutation(_view, partitioner.decorate_key(*_view, std::move(m.first)), std::move(m.second));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user