-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Conversation
@@ -20,6 +20,28 @@ use raftstore::store::{keys, util, PeerStorage}; | |||
use raftstore::Result; | |||
|
|||
|
|||
pub struct LazyRegionSnapshot<'a> { |
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.
any test?
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.
Rest LGTM
src/raftstore/coprocessor/mod.rs
Outdated
&self.ps.region | ||
} | ||
|
||
pub fn snap(&mut self) -> &RegionSnapshot { |
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.
do we need this function now?
LGTM |
Ping |
LGTM |
In most case, copr doesn't have to be run, hence create a snapshot is unnecessary.