chore: improve compatibility of EXPIRE functions with Redis (#2696)

* chore: improve compatibility of EXPIRE functions with Redis

Also, provide a module name if stumbled upon module data that can not be loaded
by dragonfly.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2024-03-12 13:50:08 +02:00 committed by GitHub
parent 4a9f816106
commit d709f2a911
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 60 additions and 20 deletions

View file

@ -23,7 +23,8 @@ namespace dfly {
enum class ListDir : uint8_t { LEFT, RIGHT };
// Dependent on ExpirePeriod representation of the value.
constexpr int64_t kMaxExpireDeadlineSec = (1u << 28) - 1;
constexpr int64_t kMaxExpireDeadlineSec = (1u << 28) - 1; // 8.5 years
constexpr int64_t kMaxExpireDeadlineMs = kMaxExpireDeadlineSec * 1000;
using DbIndex = uint16_t;
using ShardId = uint16_t;