toppartitions: fix typo

toppartitons -> toppartitions

Signed-off-by: Glauber Costa <glauber@scylladb.com>
Message-Id: <20190627160937.7842-1-glauber@scylladb.com>
(cherry picked from commit d916601ea4)

Ref #5104 (prerequisite for patch)
This commit is contained in:
Glauber Costa
2019-06-27 12:09:37 -04:00
committed by Avi Kivity
parent d7fc7bcf9f
commit bdabd2e7a4
2 changed files with 9 additions and 9 deletions

View File

@@ -57,7 +57,7 @@ void data_listeners::on_write(const schema_ptr& s, const frozen_mutation& m) {
}
}
toppartitons_item_key::operator sstring() const {
toppartitions_item_key::operator sstring() const {
std::ostringstream oss;
oss << key.key().with_schema(*schema);
return oss.str();
@@ -87,7 +87,7 @@ flat_mutation_reader toppartitions_data_listener::on_read(const schema_ptr& s, c
return make_filtering_reader(std::move(rd), [zis = this->weak_from_this(), &range, &slice, s = std::move(s)] (const dht::decorated_key& dk) {
// The data query may be executing after the toppartitions_data_listener object has been removed, so check
if (zis) {
zis->_top_k_read.append(toppartitons_item_key{s, dk});
zis->_top_k_read.append(toppartitions_item_key{s, dk});
}
return true;
});
@@ -98,7 +98,7 @@ void toppartitions_data_listener::on_write(const schema_ptr& s, const frozen_mut
return;
}
dblog.trace("toppartitions_data_listener::on_write: {}.{}", _ks, _cf);
_top_k_write.append(toppartitons_item_key{s, m.decorated_key(*s)});
_top_k_write.append(toppartitions_item_key{s, m.decorated_key(*s)});
}
toppartitions_query::toppartitions_query(distributed<database>& xdb, sstring ks, sstring cf,

View File

@@ -76,21 +76,21 @@ public:
};
struct toppartitons_item_key {
struct toppartitions_item_key {
schema_ptr schema;
dht::decorated_key key;
toppartitons_item_key(const schema_ptr& schema, const dht::decorated_key& key) : schema(schema), key(key) {}
toppartitons_item_key(const toppartitons_item_key& key) noexcept : schema(key.schema), key(key.key) {}
toppartitions_item_key(const schema_ptr& schema, const dht::decorated_key& key) : schema(schema), key(key) {}
toppartitions_item_key(const toppartitions_item_key& key) noexcept : schema(key.schema), key(key.key) {}
struct hash {
size_t operator()(const toppartitons_item_key& k) const {
size_t operator()(const toppartitions_item_key& k) const {
return std::hash<dht::token>()(k.key.token());
}
};
struct comp {
bool operator()(const toppartitons_item_key& k1, const toppartitons_item_key& k2) const {
bool operator()(const toppartitions_item_key& k1, const toppartitions_item_key& k2) const {
return k1.schema == k2.schema && k1.key.equal(*k2.schema, k2.key);
}
};
@@ -106,7 +106,7 @@ class toppartitions_data_listener : public data_listener, public weakly_referenc
sstring _cf;
public:
using top_k = utils::space_saving_top_k<toppartitons_item_key, toppartitons_item_key::hash, toppartitons_item_key::comp>;
using top_k = utils::space_saving_top_k<toppartitions_item_key, toppartitions_item_key::hash, toppartitions_item_key::comp>;
private:
top_k _top_k_read;
top_k _top_k_write;