Commit Graph

5 Commits

Author SHA1 Message Date
Kelvin Mwinuka
aea3e0675c Updated snapshot engine to user options pattern. Updated SetValue and SetExpiry functions in snapshot and aof engine to SetKeyData function that handles setting both value and expiry of a key upon restore. 2024-03-25 11:29:49 +08:00
Kelvin Mwinuka
4bc1f44e1d Added Apache 2.0 license header to all go files in src folder 2024-03-24 18:30:17 +08:00
Kelvin Mwinuka
52646d1564 Take expiry into account when creating snashot and AOF preamble. If the key is already expired when snapshot is taken, it will not be persisted. If the key is expired when loading a snapshot/preamble, it will not be restored. 2024-03-12 21:35:39 +08:00
Kelvin Mwinuka
118e155144 Created IsMaxMemoryExceeded utility function that is used to check whether the server has exceeded the max memory.
Check whether max memory is exceeded before setting value or creating new key.
Return error from SetValue function when max memory is exceeded. This change has been propagated to the aof and snapshot engines as well.
Snapshot engine now only accepts SetValue option. No longer does it neet to use CreateKeyAndLock & KeyUnlock functions itself.
2024-03-06 15:20:45 +08:00
Kelvin Clement Mwinuka
f23bbd481e Track src/aof folder but ignore aof subfolders in modules folder 2024-03-05 22:52:32 +08:00