mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
feat(acl): add validation for acl keys (#2272)
* add validation for acl keys * add tests
This commit is contained in:
parent
8126cf8252
commit
2703d4635d
11 changed files with 154 additions and 29 deletions
|
@ -31,7 +31,7 @@ constexpr size_t kTransSize [[maybe_unused]] = sizeof(Transaction);
|
|||
} // namespace
|
||||
|
||||
IntentLock::Mode Transaction::Mode() const {
|
||||
return (cid_->opt_mask() & CO::READONLY) ? IntentLock::SHARED : IntentLock::EXCLUSIVE;
|
||||
return cid_->IsReadOnly() ? IntentLock::SHARED : IntentLock::EXCLUSIVE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1362,7 +1362,7 @@ void Transaction::LogAutoJournalOnShard(EngineShard* shard) {
|
|||
return;
|
||||
|
||||
// Only write commands and/or no-key-transactional commands are logged
|
||||
if ((cid_->opt_mask() & CO::WRITE) == 0 && (cid_->opt_mask() & CO::NO_KEY_TRANSACTIONAL) == 0)
|
||||
if ((cid_->IsWriteOnly()) == 0 && (cid_->opt_mask() & CO::NO_KEY_TRANSACTIONAL) == 0)
|
||||
return;
|
||||
|
||||
// If autojournaling was disabled and not re-enabled, skip it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue