1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00

Relaxed assertion in sr_key_set::insert()

There are some corner cases where keys with two parts are needed
for a transaction. Relaxed the assertion and sanity check so that
at least two key parts are needed for each key which is assigned
to a transaction.
This commit is contained in:
Teemu Ollakka
2018-10-25 13:57:57 +03:00
parent 4ee624cfbc
commit 5391de0474

View File

@ -36,8 +36,8 @@ namespace wsrep
void insert(const wsrep::key& key)
{
assert(key.size() == 3);
if (key.size() < 3)
assert(key.size() >= 2);
if (key.size() < 2)
{
throw wsrep::runtime_error("Invalid key size");
}