Skip to content

Commit

Permalink
Minor fix in comments.
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Tianjie <[email protected]>
  • Loading branch information
CharlesChen888 committed Jul 1, 2024
1 parent e1ab7d9 commit e928f27
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/commands.def
Original file line number Diff line number Diff line change
Expand Up @@ -6823,7 +6823,7 @@ const char *FATLOG_RESET_Tips[] = {
/* FATLOG command table */
struct COMMAND_STRUCT FATLOG_Subcommands[] = {
{MAKE_CMD("get","Returns the fat log's entries.","O(N) where N is the number of entries returned","8.0.0",CMD_DOC_NONE,NULL,NULL,"server",COMMAND_GROUP_SERVER,FATLOG_GET_History,0,FATLOG_GET_Tips,2,slowlogCommand,-2,CMD_ADMIN|CMD_LOADING|CMD_STALE,0,FATLOG_GET_Keyspecs,0,NULL,1),.args=FATLOG_GET_Args},
{MAKE_CMD("help","Show helpful text about the different subcommands","O(1)","8.0.0",CMD_DOC_NONE,NULL,NULL,"server",COMMAND_GROUP_SERVER,FATLOG_HELP_History,0,FATLOG_HELP_Tips,0,slowlogCommand,2,CMD_LOADING|CMD_STALE,0,FATLOG_HELP_Keyspecs,0,NULL,0)},
{MAKE_CMD("help","Returns helpful text about the different subcommands","O(1)","8.0.0",CMD_DOC_NONE,NULL,NULL,"server",COMMAND_GROUP_SERVER,FATLOG_HELP_History,0,FATLOG_HELP_Tips,0,slowlogCommand,2,CMD_LOADING|CMD_STALE,0,FATLOG_HELP_Keyspecs,0,NULL,0)},
{MAKE_CMD("len","Returns the number of entries in the fat log.","O(1)","8.0.0",CMD_DOC_NONE,NULL,NULL,"server",COMMAND_GROUP_SERVER,FATLOG_LEN_History,0,FATLOG_LEN_Tips,3,slowlogCommand,2,CMD_ADMIN|CMD_LOADING|CMD_STALE,0,FATLOG_LEN_Keyspecs,0,NULL,0)},
{MAKE_CMD("reset","Clears all entries from the fat log.","O(N) where N is the number of entries in the fatlog","8.0.0",CMD_DOC_NONE,NULL,NULL,"server",COMMAND_GROUP_SERVER,FATLOG_RESET_History,0,FATLOG_RESET_Tips,2,slowlogCommand,2,CMD_ADMIN|CMD_LOADING|CMD_STALE,0,FATLOG_RESET_Keyspecs,0,NULL,0)},
{0}
Expand Down Expand Up @@ -7801,7 +7801,7 @@ const char *SLOWLOG_RESET_Tips[] = {
/* SLOWLOG command table */
struct COMMAND_STRUCT SLOWLOG_Subcommands[] = {
{MAKE_CMD("get","Returns the slow log's entries.","O(N) where N is the number of entries returned","2.2.12",CMD_DOC_NONE,NULL,NULL,"server",COMMAND_GROUP_SERVER,SLOWLOG_GET_History,1,SLOWLOG_GET_Tips,2,slowlogCommand,-2,CMD_ADMIN|CMD_LOADING|CMD_STALE,0,SLOWLOG_GET_Keyspecs,0,NULL,1),.args=SLOWLOG_GET_Args},
{MAKE_CMD("help","Show helpful text about the different subcommands","O(1)","6.2.0",CMD_DOC_NONE,NULL,NULL,"server",COMMAND_GROUP_SERVER,SLOWLOG_HELP_History,0,SLOWLOG_HELP_Tips,0,slowlogCommand,2,CMD_LOADING|CMD_STALE,0,SLOWLOG_HELP_Keyspecs,0,NULL,0)},
{MAKE_CMD("help","Returns helpful text about the different subcommands","O(1)","6.2.0",CMD_DOC_NONE,NULL,NULL,"server",COMMAND_GROUP_SERVER,SLOWLOG_HELP_History,0,SLOWLOG_HELP_Tips,0,slowlogCommand,2,CMD_LOADING|CMD_STALE,0,SLOWLOG_HELP_Keyspecs,0,NULL,0)},
{MAKE_CMD("len","Returns the number of entries in the slow log.","O(1)","2.2.12",CMD_DOC_NONE,NULL,NULL,"server",COMMAND_GROUP_SERVER,SLOWLOG_LEN_History,0,SLOWLOG_LEN_Tips,3,slowlogCommand,2,CMD_ADMIN|CMD_LOADING|CMD_STALE,0,SLOWLOG_LEN_Keyspecs,0,NULL,0)},
{MAKE_CMD("reset","Clears all entries from the slow log.","O(N) where N is the number of entries in the slowlog","2.2.12",CMD_DOC_NONE,NULL,NULL,"server",COMMAND_GROUP_SERVER,SLOWLOG_RESET_History,0,SLOWLOG_RESET_Tips,2,slowlogCommand,2,CMD_ADMIN|CMD_LOADING|CMD_STALE,0,SLOWLOG_RESET_Keyspecs,0,NULL,0)},
{0}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/fatlog-help.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"HELP": {
"summary": "Show helpful text about the different subcommands",
"summary": "Returns helpful text about the different subcommands",
"complexity": "O(1)",
"group": "server",
"since": "8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/slowlog-help.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"HELP": {
"summary": "Show helpful text about the different subcommands",
"summary": "Returns helpful text about the different subcommands",
"complexity": "O(1)",
"group": "server",
"since": "6.2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -3239,7 +3239,7 @@ void preventCommandReplication(client *c) {

/* Log the last command a client executed into the slowlog. */
void slowlogPushCurrentCommand(client *c, struct serverCommand *cmd, ustime_t duration) {
/* Some commands may contain sensitive data that should not be available in the slowlog. */
/* Some commands should not be available in the slowlog and the fatlog. */
if (cmd->flags & CMD_SKIP_SLOWLOG) return;

/* If command argument vector was rewritten, use the original
Expand All @@ -3251,7 +3251,7 @@ void slowlogPushCurrentCommand(client *c, struct serverCommand *cmd, ustime_t du

/* Log the last command a client executed into the fatlog. */
void fatlogPushCurrentCommand(client *c, struct serverCommand *cmd, size_t size) {
/* Some commands may contain sensitive data that should not be available in the fatlog. */
/* Some commands should not be available in the slowlog and the fatlog. */
if (cmd->flags & CMD_SKIP_SLOWLOG) return;

/* If command argument vector was rewritten, use the original
Expand Down
19 changes: 19 additions & 0 deletions valkey.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,25 @@ slowlog-log-slower-than 10000
# You can reclaim memory used by the slow log with SLOWLOG RESET.
slowlog-max-len 128

################################### FAT LOG ###################################

# The server Fat Log is a system to log packets in queries and responses which
# exceeded a specified size. The size means the total size of the RESP packet.
#
# You can configure the fat log with two parameters: one tells the server
# how big is the packet to exceed in order for the query or response to get
# logged, and the other parameter is the length of the fat log. When a new
# command is logged the oldest one is removed from the queue of logged commands.

# The following size is a memory config, so it is possible to specify it in
# the usual form of 1kb 2mb 5GB and so forth. And a value of zero forces the
# logging of every query and response.
fatlog-log-bigger-than 1mb

# There is no limit to this length. Just be aware that it will consume memory.
# You can reclaim memory used by the fat log with FATLOG RESET.
fatlog-max-len 128

################################ LATENCY MONITOR ##############################

# The server latency monitoring subsystem samples different operations
Expand Down

0 comments on commit e928f27

Please sign in to comment.