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

txn: skip constraint check for prewrite when loading data #1411

Merged
merged 7 commits into from Dec 20, 2016

Conversation

zhangjinpeng87
Copy link
Member

Skip constraint check for prewrite when loading data.
@siddontang @BusyJay @disksing PTAL

@@ -408,12 +409,14 @@ impl Storage {
Ok(())
}

#[allow(too_many_arguments)]
Copy link
Contributor

Choose a reason for hiding this comment

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

need refactor, not allow too_many_arguments directly.

@disksing
Copy link
Contributor

LGTM

@siddontang
Copy link
Contributor

LGTM
PTAL @BusyJay

@zhangjinpeng87
Copy link
Member Author

@BusyJay PTAL

pub fn prewrite(&mut self,
mutation: Mutation,
primary: &[u8],
lock_ttl: u64,
Copy link
Member

Choose a reason for hiding this comment

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

Why not use OptionsArg directly?

@@ -262,6 +263,23 @@ impl Command {

use util::transport::SendCh;

#[derive(Default)]
pub struct OptionalArgs {
Copy link
Member

Choose a reason for hiding this comment

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

OptionalArgs doesn't seem to be a good name, maybe call it Options or RwOption?

Copy link
Member

@BusyJay BusyJay left a comment

Choose a reason for hiding this comment

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

LGTM

@zhangjinpeng87 zhangjinpeng87 merged commit 7f52fd7 into master Dec 20, 2016
@zhangjinpeng87 zhangjinpeng87 deleted the zhangjinpeng/skip-constraint-check branch December 20, 2016 11:42
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.

None yet

4 participants