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

copr: fetch snapshot lazily #1845

Merged
merged 5 commits into from
May 16, 2017
Merged

copr: fetch snapshot lazily #1845

merged 5 commits into from
May 16, 2017

Conversation

BusyJay
Copy link
Member

@BusyJay BusyJay commented May 16, 2017

In most case, copr doesn't have to be run, hence create a snapshot is unnecessary.

@@ -20,6 +20,28 @@ use raftstore::store::{keys, util, PeerStorage};
use raftstore::Result;


pub struct LazyRegionSnapshot<'a> {
Copy link
Contributor

Choose a reason for hiding this comment

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

any test?

Copy link
Contributor

@siddontang siddontang left a comment

Choose a reason for hiding this comment

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

Rest LGTM

&self.ps.region
}

pub fn snap(&mut self) -> &RegionSnapshot {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need this function now?

@ngaut
Copy link
Member

ngaut commented May 16, 2017

LGTM

@BusyJay
Copy link
Member Author

BusyJay commented May 16, 2017

Ping

@zhangjinpeng87
Copy link
Member

LGTM

@BusyJay BusyJay merged commit fce1d66 into master May 16, 2017
@BusyJay BusyJay deleted the busyjay/lazy-snap branch May 16, 2017 08:31
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.

4 participants