mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
chore: add debug printings to SetExisting (#4694)
Should help debugging #4672 Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
ea6fdadd67
commit
028e08076a
1 changed files with 13 additions and 0 deletions
|
@ -869,6 +869,19 @@ OpStatus SetCmd::SetExisting(const SetParams& params, DbSlice::Iterator it,
|
|||
e_it->second = db_slice.FromAbsoluteTime(at_ms);
|
||||
} else {
|
||||
// Add new expiry information.
|
||||
|
||||
// Note: some consistency checks, following #4672. Once it's resolved we can remove them.
|
||||
// -------------------------------------------------------------------------------------
|
||||
ExpireTable* etable = db_slice.GetTables(op_args_.db_cntx.db_index).second;
|
||||
ExpireIterator check_it = etable->Find(it->first.AsRef());
|
||||
if (IsValid(check_it)) {
|
||||
LOG(ERROR) << "Inconsistent state in SetCmd::SetExisting "
|
||||
<< " key: " << key << ", "
|
||||
<< "it.key:" << it.key() << ", "
|
||||
<< "it->first:" << it->first.ToString()
|
||||
<< " params.prev_val: " << params.prev_val << " " << params.flags;
|
||||
}
|
||||
// ------------------------------------------------
|
||||
db_slice.AddExpire(op_args_.db_cntx.db_index, it, at_ms);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue