Skip to content
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 log bug in multi_get #652

Merged
merged 2 commits into from
Dec 8, 2020
Merged

fix: fix log bug in multi_get #652

merged 2 commits into from
Dec 8, 2020

Conversation

levy5307
Copy link
Contributor

@levy5307 levy5307 commented Dec 8, 2020

What problem does this PR solve?

In fuction multi_get, there is a statistical error in result size, which is used for logging. So this pr fix this bug.

Tests

  • Manual test (add detailed scripts or steps below)
  1. change to print the log when a multi_get request is coming.
  2. send a multi_get request to onebox
>>> use temp
OK
>>> set a b c
OK

app_id          : 2
partition_index : 4
decree          : 1
server          : 10.232.55.210:34802
>>> multi_get a
"a" : "b" => "c"

1 key-value pairs got, fetch completed.

app_id          : 2
partition_index : 4
server          : 10.232.55.210:34802
  1. grep the abnormal log, the result_size is not 0.
➜  onebox git:(log-bug) ✗ grep -rn -I "abnormal" .
./replica3/data/log/log.1.txt:877:W2020-12-08 12:04:32.4495 (1607400272449200763 13bb) replica.local_app0.030013ae00010074: pegasus_server_impl.cpp:733:on_multi_get(): [2.4@10.232.55.210:34803] rocksdb abnormal multi_get from 10.232.55.210:1: hash_key = a, start_sort_key =  (inclusive), stop_sort_key =  (exclusive), sort_key_filter_type = FT_NO_FILTER, sort_key_filter_pattern = , max_kv_count = -1, max_kv_size = -1, reverse = false, result_count = 2, result_size = 4, iteration_count = 2, expire_count = 0, filter_count = 0, time_used = 155070 ns

@hycdong hycdong merged commit 6a47a3b into apache:master Dec 8, 2020
@levy5307 levy5307 deleted the log-bug branch December 8, 2020 07:18
hycdong pushed a commit that referenced this pull request Dec 29, 2020
@neverchanje neverchanje mentioned this pull request Mar 1, 2021
acelyc111 pushed a commit that referenced this pull request Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants