-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX: Fix do_command_dupcheck method that didn't show 0 at same key #794
Conversation
λ²κ·Έ μμ λ§ ν¬ν¨μν€κ³ , μμ μμ μ μ μΈνλ κ²μ΄ μ’μ κ² κ°μλ°μ. μκ²¬μ΄ μ΄λ€κ°μ? |
fb1614c
to
1d52b0a
Compare
λ²κ·Έ μμ λ§μ ν¬ν¨νλλ‘ μμ νμ΅λλ€. |
μ 체 μ‘°ν (
μ κ²°κ³Όλ₯Ό 보면,
μ¦ @jhpark816
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ν μ€νΈ κ΄λ ¨ λ¦¬λ·°λ§ μ°μ μμ±ν©λλ€.
1d52b0a
to
a96d342
Compare
μλν μ€κ³μ λλ€.
|
a96d342
to
e5ecdaf
Compare
046d88c
to
7a4fb9d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 μλ£
7a4fb9d
to
db7bd65
Compare
lqdetect.c
Outdated
if (keylen > 250) { | ||
keylen = snprintf(keybuf, sizeof(keybuf), "%.*s...%.*s", 124, key, 123, (key+(keylen - 123))); | ||
keyptr = keybuf; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
long keyμ λν΄μ μ μ₯ν λλ λ³νλμ΄ μ μ₯λλ―λ‘ dupcheck ν λλ long keyμ λν΄μλ λ³νλ key λ₯Ό κΈ°μ€μΌλ‘ λ³κ²½ν΄μΌν©λλ€.
λ°λΌμ ν΄λΉ λ‘μ§μ μΆκ°νμμ΅λλ€.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
countκ° 0μΌ λλ§ μλ―Έκ° μλ λμμ΄μ£ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
count == 0μΈ κ²½μ°μλ§ μλ―Έκ° μλ λμμ΄ λ§μ΅λλ€.
λλ΅ μλμ κ°μ΄ ꡬννλ κ²μ΄ μ’κ² μ΅λλ€.
- do_command_dupcheck() => is_command_duplicated()
- νΈμΆνλ μͺ½μμ do_command_dupcheck() νΈμΆ μ κ±°
do_lqdetect_write()
{
if (keylen > 250) {
keylen = snprintf(keybuf, sizeof(keybuf), "%.*s...%.*s",
124, key, 123, (key+(keylen - 123)));
keyptr = keybuf;
}
if (is_command_duplicated(keyptr, keylen, cmd, arg) != true) {
gettimeofday(&val, NULL);
ptm = localtime(&val.tv_sec);
. . .
lqdetect.arg[cmd][nsaved] = *arg;
buffer->nsaved += 1;
}
}
lqdetect.c
Outdated
if (keylen > 250) { | ||
keylen = snprintf(keybuf, sizeof(keybuf), "%.*s...%.*s", 124, key, 123, (key+(keylen - 123))); | ||
keyptr = keybuf; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
countκ° 0μΌ λλ§ μλ―Έκ° μλ λμμ΄μ£ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 μλ£
lqdetect.c
Outdated
if (keylen > 250) { | ||
keylen = snprintf(keybuf, sizeof(keybuf), "%.*s...%.*s", 124, key, 123, (key+(keylen - 123))); | ||
keyptr = keybuf; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
count == 0μΈ κ²½μ°μλ§ μλ―Έκ° μλ λμμ΄ λ§μ΅λλ€.
λλ΅ μλμ κ°μ΄ ꡬννλ κ²μ΄ μ’κ² μ΅λλ€.
- do_command_dupcheck() => is_command_duplicated()
- νΈμΆνλ μͺ½μμ do_command_dupcheck() νΈμΆ μ κ±°
do_lqdetect_write()
{
if (keylen > 250) {
keylen = snprintf(keybuf, sizeof(keybuf), "%.*s...%.*s",
124, key, 123, (key+(keylen - 123)));
keyptr = keybuf;
}
if (is_command_duplicated(keyptr, keylen, cmd, arg) != true) {
gettimeofday(&val, NULL);
ptm = localtime(&val.tv_sec);
. . .
lqdetect.arg[cmd][nsaved] = *arg;
buffer->nsaved += 1;
}
}
db7bd65
to
86d6298
Compare
86d6298
to
03a7113
Compare
π Related Issue
β¨οΈ What I did
sop get arcus 0
)μ λμ€μ μ€νμν€λ©΄ lqdetect show μμ λΉ μ§λ λ²κ·Έλ₯Ό μμ νμμ΅λλ€.