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

Add option to decide panic or not when key exceed bound #4254

Merged
merged 5 commits into from Feb 23, 2019

Conversation

@zhangjinpeng1987
Copy link
Member

commented Feb 22, 2019

Signed-off-by: zhangjinpeng1987 zhangjinpeng@pingcap.com

What have you changed? (mandatory)

Previously TiKV will panic when encounter key exceed bound error, add a configuration to control panic or return error in this condition.

What are the type of the changes? (mandatory)

The currently defined types are listed below, please pick one of the types for this PR by removing the others:

  • Improvement (change which is an improvement to an existing feature)

How has this PR been tested? (mandatory)

Unit test

Does this PR affect documentation (docs) update? (mandatory)

No

Does this PR affect tidb-ansible update? (mandatory)

No

add option to decide panic or not when key exceed bound
Signed-off-by: zhangjinpeng1987 <zhangjinpeng@pingcap.com>
fix test
Signed-off-by: zhangjinpeng1987 <zhangjinpeng@pingcap.com>
@Connor1996
Copy link
Member

left a comment

LGTM

@breeswish
Copy link
Member

left a comment

LGTM, but it looks very tricky to use a global variable instead of traditional config passing...

@zhangjinpeng1987

This comment has been minimized.

Copy link
Member Author

commented Feb 22, 2019

@breeswish I have tried, and it will pass the config to destination through a very long path, it is more ugly than current way.

@zhangjinpeng1987 zhangjinpeng1987 dismissed stale reviews from breeswish and Connor1996 via bf1c672 Feb 22, 2019

fix ValueAfterTable error for toml::to_string
Signed-off-by: zhangjinpeng1987 <zhangjinpeng@pingcap.com>
@zhangjinpeng1987

This comment has been minimized.

Copy link
Member Author

commented Feb 22, 2019

/run-all-tests

@nolouch
Copy link
Contributor

left a comment

rest LGTM

Ok(content) => content,
Err(e) => panic!("toml to string error: {:?}", e),
};
//let content = toml::to_string(&self).unwrap();

This comment has been minimized.

Copy link
@nolouch

nolouch Feb 22, 2019

Contributor

remove this line.

This comment has been minimized.

Copy link
@zhangjinpeng1987

zhangjinpeng1987 Feb 22, 2019

Author Member

Done

address comments
Signed-off-by: zhangjinpeng1987 <zhangjinpeng@pingcap.com>
Show resolved Hide resolved src/config.rs

@zhangjinpeng1987 zhangjinpeng1987 merged commit 1e3ec16 into tikv:master Feb 23, 2019

2 checks passed

DCO All commits are signed off!
Details
idc-jenkins-ci/test Jenkins job succeeded.
Details

@zhangjinpeng1987 zhangjinpeng1987 deleted the zhangjinpeng1987:panic-option branch Feb 23, 2019

Connor1996 added a commit to Connor1996/tikv that referenced this pull request Mar 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.