VenuReddy2103 opened a new pull request, #3976:
URL: https://github.com/apache/hive/pull/3976

   ### What changes were proposed in this pull request?
   Setting savepoint in transaction before direct sql processing and rollback 
to savepoint before moving to JDO processing.
   
   ### Why are the changes needed?
   Failure in direct SQL processing do not undo the changes made to database 
before falling back to JDO based processing. Thus results in stale/dangling 
entries in database forever.
   
   For instance, during dropPartitions() direct SQL processing, after dropping 
rows from few tables(like PARTITIONS, PARTITION_PARAMS, PARTITION_KEY_VALS 
etc), it causes typecast exception in dropStorageDescriptors() and fallback to 
JDO processing. But datanucleus JDO processing cannot delete rows from 
remaining tables(i.e., from sds, serdes, sds_params, serde_params, sort_cols, 
bucketing_cols, skewed cols/values/location if any for the partitions) since 
the partition is already in the same transaction during direct SQL processing.
   
   This issue is applicable in the cases where database is modified(i.e., add 
partitions[https://github.com/apache/hive/pull/3905](https://github.com/apache/hive/pull/3905)
 , drop partitions) in direct sql processing and fails in between.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Tested manually and also ran unittests
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to