From d58c809edf96123d286fd19b2ffbb3270835cde2 Mon Sep 17 00:00:00 2001 From: suxb201 Date: Sun, 11 Sep 2022 10:58:26 +0800 Subject: [PATCH] sync LUA script from rdb --- internal/rdb/rdb.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/rdb/rdb.go b/internal/rdb/rdb.go index f4b260d1..0ac7dd08 100644 --- a/internal/rdb/rdb.go +++ b/internal/rdb/rdb.go @@ -115,6 +115,12 @@ func (ld *Loader) parseRDBEntry(rd *bufio.Reader) { log.PanicError(err) } log.Infof("RDB repl-stream-db: %d", ld.replStreamDbId) + } else if key == "lua" { + e := entry.NewEntry() + e.Argv = []string{"script", "load", value} + e.IsBase = true + ld.ch <- e + log.Infof("LUA script: [%s]", value) } else { log.Infof("RDB AUX fields. key=[%s], value=[%s]", key, value) }