Skip to content

Conversation

@jayadevanmurali
Copy link
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
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
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
Contributor Author

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
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
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
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
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
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
Contributor Author

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
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

Can one of the admins verify this patch?

srowen added a commit to srowen/spark that referenced this pull request Mar 22, 2017
@srowen srowen mentioned this pull request Mar 22, 2017
@asfgit asfgit closed this in b70c03a Mar 23, 2017
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.

5 participants