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

[CARBONDATA-3369] Fix issues during concurrent execution of Create table If not exists #3198

Closed
wants to merge 3 commits into from

Conversation

KanakaKumar
Copy link
Contributor

@KanakaKumar KanakaKumar commented May 3, 2019

Create table if not exists has following problems if run concurrently from different drivers

  1. Sometimes It fails with error "Table <db.table> already exists."
  2. Create table failed driver still holds the table with wrong path or schema. Eventual operations refer the wrong path
  3. Stale path created during create table is not deleted for ever [After 1.5.0 version table will be created in a new folder using UUID if folder with table name already exists]

This PR fixes above 3 issues.

Be sure to do all of the following checklist to help us incorporate
your contribution quickly and easily:

  • Any interfaces changed?
    No

  • Any backward compatibility impacted?
    No

  • Document update required?
    NA

  • Testing done
    Please provide details on
    - Whether new unit test cases have been added or why no new tests are required?
    Yes
    - How it is tested? Please attach test report.
    - Is it a performance related change? Please attach the performance test report.
    - Any additional information to help reviewers in testing this change.

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/3074/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/11338/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/3273/

}

// No need to throw for create if not exists
if (!ifNotExistsSet) {
Copy link
Contributor

Choose a reason for hiding this comment

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

But in old code, this check was not handled. where it was handled in old code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In old code this check was missing, and so "create table if not exists" throwing table already exists exception.

@CarbonDataQA
Copy link

Build Failed with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/11378/

@CarbonDataQA
Copy link

Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/3313/

@CarbonDataQA
Copy link

Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/3114/

@CarbonDataQA
Copy link

Build Failed with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/11381/

@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/3118/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/3316/

@KanakaKumar
Copy link
Contributor Author

retest this please

@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/3122/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/3321/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/11386/

@ravipesala
Copy link
Contributor

LGTM

@asfgit asfgit closed this in 157de1d May 8, 2019
asfgit pushed a commit that referenced this pull request May 16, 2019
…ble If not exists

Create table if not exists has following problems if run concurrently from different drivers
Sometimes It fails with error Table <db.table> already exists.
Create table failed driver still holds the table with wrong path or schema. Eventual operations refer the wrong path
Stale path created during create table is not deleted for ever [After 1.5.0 version table will be created in a new folder using UUID if folder with table name already exists]
This PR fixes above 3 issues.

This closes #3198
qiuchenjian pushed a commit to qiuchenjian/carbondata that referenced this pull request Jun 14, 2019
…ble If not exists

Create table if not exists has following problems if run concurrently from different drivers
Sometimes It fails with error Table <db.table> already exists.
Create table failed driver still holds the table with wrong path or schema. Eventual operations refer the wrong path
Stale path created during create table is not deleted for ever [After 1.5.0 version table will be created in a new folder using UUID if folder with table name already exists]
This PR fixes above 3 issues.

This closes apache#3198
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

3 participants