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

raftstore: skip empty callback #4682

Merged
merged 10 commits into from May 28, 2019

Conversation

BusyJay
Copy link
Member

@BusyJay BusyJay commented May 10, 2019

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)

  • Improvement

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.

Signed-off-by: Jay Lee <busyjaylee@gmail.com>
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
@BusyJay BusyJay added sig/raft Component: Raft, RaftStore, etc. type/enhancement Type: Issue - Enhancement labels May 10, 2019
src/raftstore/store/fsm/apply.rs Outdated Show resolved Hide resolved
src/raftstore/store/fsm/apply.rs Outdated Show resolved Hide resolved
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
@zhangjinpeng87
Copy link
Member

@hicqu @overvenus PTAL


/// Test if the callback proposed by read index is cleared correctly.
#[test]
fn test_lease_read_callback_destroy() {
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Connor1996
Connor1996 previously approved these changes May 16, 2019
Copy link
Member

@Connor1996 Connor1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

overvenus
overvenus previously approved these changes May 16, 2019
@kennytm
Copy link
Contributor

kennytm commented May 16, 2019

/run-integration-tests

Signed-off-by: Jay Lee <busyjaylee@gmail.com>
@BusyJay BusyJay dismissed stale reviews from overvenus and Connor1996 via 12c0bef May 27, 2019 08:56
@BusyJay
Copy link
Member Author

BusyJay commented May 27, 2019

/run-integration-tests

@BusyJay
Copy link
Member Author

BusyJay commented May 28, 2019

/run-integration-tests

@kennytm
Copy link
Contributor

kennytm commented May 28, 2019

/run-integration-tests

@kennytm kennytm merged commit 3f28b54 into tikv:master May 28, 2019
BusyJay added a commit to BusyJay/tikv that referenced this pull request Jun 13, 2019
* 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>
BusyJay added a commit to BusyJay/tikv that referenced this pull request Jun 13, 2019
* 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>
BusyJay added a commit that referenced this pull request Jun 14, 2019
* raftstore: ignore error when sending messages (#4734)
* raftstore: skip empty callback (#4682)

Signed-off-by: Jay Lee <busyjaylee@gmail.com>
overvenus pushed a commit that referenced this pull request Jul 3, 2019
* 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>
sticnarf pushed a commit to sticnarf/tikv that referenced this pull request Oct 27, 2019
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/raft Component: Raft, RaftStore, etc. type/enhancement Type: Issue - Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants