mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
service::client_state::has_access(): make readable_system_resources an std::unordered_set
There is not reason to use an std::set for it since we don't care about the ordering - only about the existance of a particular entry. Hash table will be more efficient for this use case. Signed-off-by: Vlad Zolotarov <vladz@scylladb.com> Message-Id: <1528220892-5784-2-git-send-email-vladz@scylladb.com>
This commit is contained in:
committed by
Avi Kivity
parent
833d34e88a
commit
12e3e4fb2a
@@ -176,8 +176,8 @@ future<> service::client_state::has_access(const sstring& ks, auth::permission p
|
||||
}
|
||||
}
|
||||
|
||||
static thread_local std::set<auth::resource> readable_system_resources = [] {
|
||||
std::set<auth::resource> tmp;
|
||||
static thread_local std::unordered_set<auth::resource> readable_system_resources = [] {
|
||||
std::unordered_set<auth::resource> tmp;
|
||||
for (auto cf : { db::system_keyspace::LOCAL, db::system_keyspace::PEERS }) {
|
||||
tmp.insert(auth::make_data_resource(db::system_keyspace::NAME, cf));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user