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
raftstore: skip empty callback #4682
Conversation
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
@hicqu @overvenus PTAL |
|
||
/// Test if the callback proposed by read index is cleared correctly. | ||
#[test] | ||
fn test_lease_read_callback_destroy() { |
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.
Does it fail without your change?
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.
Yes, it will panic at https://github.com/tikv/tikv/pull/4682/files#diff-79ba1b5dd0906a82a30f8ab9eba6ebd2R853.
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.
LGTM
/run-integration-tests |
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
/run-integration-tests |
/run-integration-tests |
/run-integration-tests |
* add test cases Signed-off-by: Jay Lee <busyjaylee@gmail.com> * skip empty callback Signed-off-by: Jay Lee <busyjaylee@gmail.com> * address comment Signed-off-by: Jay Lee <busyjaylee@gmail.com>
* add test cases Signed-off-by: Jay Lee <busyjaylee@gmail.com> * skip empty callback Signed-off-by: Jay Lee <busyjaylee@gmail.com> * address comment Signed-off-by: Jay Lee <busyjaylee@gmail.com>
* raftstore: skip empty callback (#4682) * add test cases Signed-off-by: disksing <i@disksing.com> * fix format Signed-off-by: disksing <i@disksing.com> * fix build Signed-off-by: disksing <i@disksing.com> * Bump to 2.1.14 Signed-off-by: Neil Shen <overvenus@gmail.com>
* add test cases Signed-off-by: Jay Lee <busyjaylee@gmail.com> * skip empty callback Signed-off-by: Jay Lee <busyjaylee@gmail.com> * address comment Signed-off-by: Jay Lee <busyjaylee@gmail.com>
What have you changed? (mandatory)
There are several situations in TiKV that propose with empty callbacks.
Such callbacks don't have to be sent to apply worker. Besides if an empty
callbacks is associated with an empty proposal, it may cause false report
of stale command.
What are the type of the changes? (mandatory)
How has this PR been tested? (mandatory)
unit tests
Does this PR affect documentation (docs) or release note? (mandatory)
No.
Does this PR affect tidb-ansible update? (mandatory)
No.