Skip to content

Commit

Permalink
To fix the issue: show_techsupport & saidump errors during testbed te…
Browse files Browse the repository at this point in the history
…sting by replacing redis-rdb-tool with rdb-cli (#1391) (#1471)

Why I did it
Fix issue: #1387
The latest redis-rdb-tools-0.1.15 doesn't support Redis 7.0. Redis 7.0 was released in 2020 and adopted by SONiC's latest version. So, this issue turned out.

https://github.com/sripathikrishnan/redis-rdb-tools

I.e., the rdb-tools is far behind the Redis 7.0. The librdb can perfectly fix this issue. Please see quote from https://github.com/redis/librdb.

Motivation behind this project
There is a genuine need by the Redis community for a versatile RDB file parser that can export data, perform data analysis, or merely extract raw data from RDB and RESTORE it against a live Redis server. However, available parsers have shortcomings in some aspects such as lack of long-term support, lagging far behind the latest Redis release, and usually not being optimized for memory, performance, or high-traffic streaming for production environments. Additionally, most of them are not written in C, which limits the reuse of Redis components and the potential to contribute back to Redis repo. To address these issues, it is worthwhile to develop a new parser with a modern architecture, that maybe can also challenge the current integrated RDB parser of Redis and even replace it in the future.

So, the below PRS are to replace rdbtools with librdb's tool rdb-cli.
sonic-net/sonic-buildimage#19268

Co-authored-by: JunhongMao <[email protected]>
  • Loading branch information
yejianquan and JunhongMao authored Nov 22, 2024
1 parent a00e89d commit 4f1ad92
Show file tree
Hide file tree
Showing 14 changed files with 18,889 additions and 209 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ unittest/meta/tests
unittest/syncd/tests
unittest/vslib/tests
unittest/vslib/testslibsaivs
unittest/saidump/tests
vslib/tests

# Temporary files #
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ AC_OUTPUT(Makefile
unittest/lib/Makefile
unittest/vslib/Makefile
unittest/syncd/Makefile
unittest/saidump/Makefile
pyext/Makefile
pyext/py2/Makefile
pyext/py3/Makefile)
8 changes: 7 additions & 1 deletion saidump/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ AM_CXXFLAGS = $(SAIINC) -I$(top_srcdir)/lib

bin_PROGRAMS = saidump

saidump_SOURCES = saidump.cpp
saidump_SOURCES = main.cpp SaiDump.cpp
saidump_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
saidump_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON) $(CODE_COVERAGE_CXXFLAGS)
saidump_LDADD = -lhiredis -lswsscommon -lpthread -L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta \
-L$(top_srcdir)/lib/.libs -lsairedis -lzmq $(CODE_COVERAGE_LIBS)

noinst_LIBRARIES = libsaidump.a

libsaidump_a_SOURCES = SaiDump.cpp
libsaidump_a_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
libsaidump_a_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON) $(CODE_COVERAGE_CXXFLAGS)
Loading

0 comments on commit 4f1ad92

Please sign in to comment.