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

WT-6741 Add check for supported data source on import #6058

Merged
merged 7 commits into from Oct 9, 2020

Conversation

tetsuo-cpp
Copy link
Contributor

@tetsuo-cpp tetsuo-cpp commented Oct 8, 2020

This PR adds checks and testing for when we try to import data sources other than file: or table:.
The new logic checks the URI prefix and rejects any other data sources in the import case.


exclusive = __wt_config_getones(session, config, "exclusive", &cval) == 0 && cval.val != 0;
import = __wt_config_getones(session, config, "import.enabled", &cval) == 0 && cval.val != 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since I'm doing the check up here, I decided to pass import into the helpers instead of doing redundant configuration parsing later.

Copy link
Member

Choose a reason for hiding this comment

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

I just saw this go by. This is a good thing. Configuration parsing is expensive so avoiding multiple calls to parse is better. Create is not a critical path but it does add up.

Copy link
Contributor

@tammybailey tammybailey left a comment

Choose a reason for hiding this comment

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

lgtm

@tetsuo-cpp tetsuo-cpp merged commit 700d4fe into develop Oct 9, 2020
@tetsuo-cpp tetsuo-cpp deleted the wt-6741-check-source-type branch October 9, 2020 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants