jackylk commented on a change in pull request #3548: [CARBONDATA-3600]Fix the
cleanup failure issue if user fails to access table
URL: https://github.com/apache/carbondata/pull/3548#discussion_r363073041
##########
File path:
integration/spark2/src/main/scala/org/apache/spark/sql/CarbonEnv.scala
##########
@@ -135,17 +135,25 @@ class CarbonEnv {
dataMapSchema =>
if (null != dataMapSchema.getRelationIdentifier &&
!dataMapSchema.isIndexDataMap) {
- if (!sparkSession.sessionState
- .catalog
-
.tableExists(TableIdentifier(dataMapSchema.getRelationIdentifier.getTableName,
- Some(dataMapSchema.getRelationIdentifier.getDatabaseName)))) {
+ val isTableExists = try {
+ sparkSession.sessionState
+ .catalog
+
.tableExists(TableIdentifier(dataMapSchema.getRelationIdentifier.getTableName,
+ Some(dataMapSchema.getRelationIdentifier.getDatabaseName)))
+ } catch {
+ // we need to take care of cleanup when the table does not exists,
if table exists and
+ // some other user tries to access the table, it might fail, that
time no need to handle
+ case ex: Exception =>
Review comment:
Should catch NoSuchTableException?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services