mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
Remove check-fail in ExpireIfNeeded and introduce DFLY LOAD (#2699)
* chore: prevent crashing upon inconsistent expiry table Also, introduce "DFLY LOAD <filename>" command in addition to "DEBUG LOAD" as an official command to load snapshots into the running server. --------- Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
8a5ed442d1
commit
954780edd1
5 changed files with 44 additions and 21 deletions
|
@ -260,9 +260,13 @@ TEST_F(RdbTest, ReloadTtl) {
|
|||
TEST_F(RdbTest, ReloadExpired) {
|
||||
Run({"set", "key", "val"});
|
||||
Run({"expire", "key", "2"});
|
||||
sleep(2);
|
||||
Run({"debug", "reload"});
|
||||
auto resp = Run({"get", "key"});
|
||||
RespExpr resp = Run({"save", "df"});
|
||||
ASSERT_EQ(resp, "OK");
|
||||
auto save_info = service_->server_family().GetLastSaveInfo();
|
||||
AdvanceTime(2000);
|
||||
resp = Run({"debug", "load", save_info.file_name});
|
||||
ASSERT_EQ(resp, "OK");
|
||||
resp = Run({"get", "key"});
|
||||
ASSERT_THAT(resp, ArgType(RespExpr::NIL));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue