Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

unify reset/cleanup usage in Listener/Part #484

Merged
merged 2 commits into from
Jun 10, 2021

Conversation

critical27
Copy link
Contributor

  1. Remove useless lastId_ and lastTerm_ in Listener. @bright-starry-sky, you can use leaderCommitId_ to check if listener has catch up with leader. (when leaderCommitId_ == 0, could return false)
  2. Unify the usage of reset and cleanup in RaftPart/Part/Listener:
  • reset will clean all things (wal, Id, info about state machine), it will call cleanup
  • cleanup only cleans info about state machine

Copy link
Contributor

@bright-starry-sky bright-starry-sky left a comment

Choose a reason for hiding this comment

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

artimg

@bright-starry-sky
Copy link
Contributor

File Conflicting

Copy link
Contributor

@bright-starry-sky bright-starry-sky left a comment

Choose a reason for hiding this comment

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

LGTM

@bright-starry-sky bright-starry-sky merged commit 2552a00 into vesoft-inc:master Jun 10, 2021
@critical27 critical27 deleted the listener branch June 10, 2021 11:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants