Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/unstable' into fix_module_call
Browse files Browse the repository at this point in the history
Signed-off-by: Binbin <[email protected]>
  • Loading branch information
enjoy-binbin committed Sep 25, 2024
2 parents 8c05463 + af81174 commit 87e95a6
Show file tree
Hide file tree
Showing 65 changed files with 2,126 additions and 2,231 deletions.
1 change: 1 addition & 0 deletions cmake-build-debug/CMakeFiles/clion-Debug-log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CMakeLists.txt not found in /Users/zhubinbin/github/valkey Select CMakeLists.txt
2 changes: 1 addition & 1 deletion src/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ BasedOnStyle: LLVM
IndentWidth: 4
TabWidth: 4
UseTab: Never
ColumnLimit: 120
ColumnLimit: 0
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 100
Expand Down
56 changes: 27 additions & 29 deletions src/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3117,37 +3117,35 @@ void aclCommand(client *c) {

addReply(c, shared.ok);
} else if (c->argc == 2 && !strcasecmp(sub, "help")) {
/* clang-format off */
const char *help[] = {
"CAT [<category>]",
" List all commands that belong to <category>, or all command categories",
" when no category is specified.",
"DELUSER <username> [<username> ...]",
" Delete a list of users.",
"DRYRUN <username> <command> [<arg> ...]",
" Returns whether the user can execute the given command without executing the command.",
"GETUSER <username>",
" Get the user's details.",
"GENPASS [<bits>]",
" Generate a secure 256-bit user password. The optional `bits` argument can",
" be used to specify a different size.",
"LIST",
" Show users details in config file format.",
"LOAD",
" Reload users from the ACL file.",
"LOG [<count> | RESET]",
" Show the ACL log entries.",
"SAVE",
" Save the current config to the ACL file.",
"SETUSER <username> <attribute> [<attribute> ...]",
" Create or modify a user with the specified attributes.",
"USERS",
" List all the registered usernames.",
"WHOAMI",
" Return the current connection username.",
NULL
"CAT [<category>]",
" List all commands that belong to <category>, or all command categories",
" when no category is specified.",
"DELUSER <username> [<username> ...]",
" Delete a list of users.",
"DRYRUN <username> <command> [<arg> ...]",
" Returns whether the user can execute the given command without executing the command.",
"GETUSER <username>",
" Get the user's details.",
"GENPASS [<bits>]",
" Generate a secure 256-bit user password. The optional `bits` argument can",
" be used to specify a different size.",
"LIST",
" Show users details in config file format.",
"LOAD",
" Reload users from the ACL file.",
"LOG [<count> | RESET]",
" Show the ACL log entries.",
"SAVE",
" Save the current config to the ACL file.",
"SETUSER <username> <attribute> [<attribute> ...]",
" Create or modify a user with the specified attributes.",
"USERS",
" List all the registered usernames.",
"WHOAMI",
" Return the current connection username.",
NULL,
};
/* clang-format on */
addReplyHelp(c, help);
} else {
addReplySubcommandSyntaxError(c);
Expand Down
12 changes: 6 additions & 6 deletions src/ae.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@
#endif
#endif

#define AE_LOCK(eventLoop) \
if ((eventLoop)->flags & AE_PROTECT_POLL) { \
assert(pthread_mutex_lock(&(eventLoop)->poll_mutex) == 0); \
#define AE_LOCK(eventLoop) \
if ((eventLoop)->flags & AE_PROTECT_POLL) { \
assert(pthread_mutex_lock(&(eventLoop)->poll_mutex) == 0); \
}

#define AE_UNLOCK(eventLoop) \
if ((eventLoop)->flags & AE_PROTECT_POLL) { \
assert(pthread_mutex_unlock(&(eventLoop)->poll_mutex) == 0); \
#define AE_UNLOCK(eventLoop) \
if ((eventLoop)->flags & AE_PROTECT_POLL) { \
assert(pthread_mutex_unlock(&(eventLoop)->poll_mutex) == 0); \
}

aeEventLoop *aeCreateEventLoop(int setsize) {
Expand Down
11 changes: 5 additions & 6 deletions src/ae.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@
#define AE_NONE 0 /* No events registered. */
#define AE_READABLE 1 /* Fire when descriptor is readable. */
#define AE_WRITABLE 2 /* Fire when descriptor is writable. */
#define AE_BARRIER \
4 /* With WRITABLE, never fire the event if the \
READABLE event already fired in the same event \
loop iteration. Useful when you want to persist \
things to disk before sending replies, and want \
to do that in a group fashion. */
#define AE_BARRIER 4 /* With WRITABLE, never fire the event if the \
READABLE event already fired in the same event \
loop iteration. Useful when you want to persist \
things to disk before sending replies, and want \
to do that in a group fashion. */

#define AE_FILE_EVENTS (1 << 0)
#define AE_TIME_EVENTS (1 << 1)
Expand Down
40 changes: 19 additions & 21 deletions src/asciilogo.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,23 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

/* clang-format off */
const char *ascii_logo =
" .+^+. \n"
" .+#########+. \n"
" .+########+########+. Valkey %s (%s/%d) %s bit\n"
" .+########+' '+########+. \n"
" .########+' .+. '+########. Running in %s mode\n"
" |####+' .+#######+. '+####| Port: %d\n"
" |###| .+###############+. |###| PID: %ld \n"
" |###| |#####*'' ''*#####| |###| \n"
" |###| |####' .-. '####| |###| \n"
" |###| |###( (@@@) )###| |###| https://valkey.io \n"
" |###| |####. '-' .####| |###| \n"
" |###| |#####*. .*#####| |###| \n"
" |###| '+#####| |#####+' |###| \n"
" |####+. +##| |#+' .+####| \n"
" '#######+ |##| .+########' \n"
" '+###| |##| .+########+' \n"
" '| |####+########+' \n"
" +#########+' \n"
" '+v+' \n\n";
/* clang-format off */
" .+^+. \n"
" .+#########+. \n"
" .+########+########+. Valkey %s (%s/%d) %s bit\n"
" .+########+' '+########+. \n"
" .########+' .+. '+########. Running in %s mode\n"
" |####+' .+#######+. '+####| Port: %d\n"
" |###| .+###############+. |###| PID: %ld \n"
" |###| |#####*'' ''*#####| |###| \n"
" |###| |####' .-. '####| |###| \n"
" |###| |###( (@@@) )###| |###| https://valkey.io \n"
" |###| |####. '-' .####| |###| \n"
" |###| |#####*. .*#####| |###| \n"
" |###| '+#####| |#####+' |###| \n"
" |####+. +##| |#+' .+####| \n"
" '#######+ |##| .+########' \n"
" '+###| |##| .+########+' \n"
" '| |####+########+' \n"
" +#########+' \n"
" '+v+' \n\n";
Loading

0 comments on commit 87e95a6

Please sign in to comment.