Skip to content

[SPARK-18097][SQL] Add exception catch to handle corrupted metadata scenario while dropping the table - #16083

Closed
jayadevanmurali wants to merge 5 commits into
apache:masterfrom
jayadevanmurali:branch-0.1-SPARK-18097
Closed

[SPARK-18097][SQL] Add exception catch to handle corrupted metadata scenario while dropping the table#16083
jayadevanmurali wants to merge 5 commits into
apache:masterfrom
jayadevanmurali:branch-0.1-SPARK-18097

Conversation

@jayadevanmurali

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Add exception catch to handle corrupted meta data scenario while dropping the table

How was this patch tested?

Unit tests

Please review http://spark.apache.org/contributing.html before opening a pull request.

@thomastechs

Copy link
Copy Markdown
Contributor

This patch would be catching the exception happening while the metadatacheck(due to getting corrupted) and continue with a warning log and continue with the drop operation...

case _ =>
}
} catch {
case e: QueryExecutionException => log.warn(e.toString, e)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How did you test this?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Hi @gatorsmile, I tested this change against all existing test cases. Also @davies mentioned in the jira itself, we cannot purposefully corrupt the meta data. So I tested and verified, this change will not break any existing test cases. And we are expecting QueryExecutionException when the meta data is get corrupted in some way.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The existing test cases do not cover this case. I am afraid this might not work as expected. We need to test it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@gatorsmile and @davies ; In that case, any suggestions to mock the metadata corrupt scenario?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I do not know why we can hit QueryExecutionException in getTableMetadata.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe you can manually modify the metadata stored in the database and check whether it fails as expected.

@HyukjinKwon

Copy link
Copy Markdown
Member

Hi @jayadevanmurali, are you still working on this? It seems inactive for few months. Maybe, it might better be closed for now if you are currently not able to proceed further.

@jayadevanmurali

Copy link
Copy Markdown
ContributorAuthor

Hi @HyukjinKwon ,
I tried to corrupt the metadata by editing files under spark/warehouse directory. But it is not working. Do you have any idea to corrupt metadata manually.
Thanks

@HyukjinKwon

Copy link
Copy Markdown
Member

Actually, I don't know (or heard of) how the schema is corrupt. I guess any committer should verify this before merging it. How about asking this to dev/user mailing list if you are not sure? If it is expected to be open without the reproducible steps for a long time (like few weeks or months), I guess we maybe should better close this for now and then open it latter.

@AmplabJenkins

Copy link
Copy Markdown

Can one of the admins verify this patch?

srowen added a commit to srowen/spark that referenced this pull request Mar 22, 2017
@srowensrowen mentioned this pull request Mar 22, 2017
zifeif2 pushed a commit to zifeif2/spark that referenced this pull request Nov 22, 2025
Closesapache#16819Closesapache#13467Closesapache#16083Closesapache#17135Closesapache#8785Closesapache#16278Closesapache#16997Closesapache#17073Closesapache#17220
Added:
Closesapache#12059Closesapache#12524Closesapache#12888Closesapache#16061
Author: Sean Owen <sowen@cloudera.com>
Closesapache#17386 from srowen/StalePRs.
Sign up for freeto 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.

5 participants

@jayadevanmurali@thomastechs@HyukjinKwon@AmplabJenkins@gatorsmile