[GitHub] carbondata pull request #1734: [CARBONDATA-1912] Handling lock issues for al...

classic Classic list List threaded Threaded
34 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1734: [CARBONDATA-1912] Handling lock issues for al...

qiuchenjian-2
GitHub user ManoharVanam opened a pull request:

    https://github.com/apache/carbondata/pull/1734

    [CARBONDATA-1912] Handling lock issues for alter rename operation

    Description : In case of any exception in alter rename operation, need to release all acquired locks
   
    Be sure to do all of the following checklist to help us incorporate
    your contribution quickly and easily:
   
     - [ ] Any interfaces changed?
     
     - [ ] Any backward compatibility impacted?
     
     - [ ] Document update required?
   
     - [ ] Testing done
            Please provide details on
            - Whether new unit test cases have been added or why no new tests are required?
            - 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.
   


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ManoharVanam/incubator-carbondata defect1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/1734.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1734
   
----
commit 15f1d4b8c5c3135888cc59ceebc27523b7430162
Author: Manohar <manohar.crazy09@...>
Date:   2017-12-28T04:33:44Z

    Handling lock issues in case of alter rename operation

----


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1734: [CARBONDATA-1912] Handling lock issues for alter ren...

qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1734
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2378/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1734: [CARBONDATA-1912] Handling lock issues for alter ren...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1734
 
    Build Failed with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1162/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1734: [CARBONDATA-1912] Handling lock issues for alter ren...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ManoharVanam commented on the issue:

    https://github.com/apache/carbondata/pull/1734
 
    retest this please


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1734: [CARBONDATA-1912] Handling lock issues for alter ren...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ManoharVanam commented on the issue:

    https://github.com/apache/carbondata/pull/1734
 
    retest sdv please


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1734: [CARBONDATA-1912] Handling lock issues for alter ren...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1734
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2382/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1734: [CARBONDATA-1912] Handling lock issues for alter ren...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1734
 
    Build Failed with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1166/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1734: [CARBONDATA-1912] Handling lock issues for alter ren...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1734
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2389/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1734: [CARBONDATA-1912] Handling lock issues for alter ren...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ManoharVanam commented on the issue:

    https://github.com/apache/carbondata/pull/1734
 
    retest this please


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1734: [CARBONDATA-1912] Handling lock issues for alter ren...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ManoharVanam commented on the issue:

    https://github.com/apache/carbondata/pull/1734
 
    retest sdv please


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1734: [CARBONDATA-1912] Handling lock issues for alter ren...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1734
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2403/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1734: [CARBONDATA-1912] Handling lock issues for al...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1734#discussion_r158955988
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableRenameCommand.scala ---
    @@ -156,15 +156,20 @@ private[sql] case class CarbonAlterTableRenameCommand(
         } catch {
           case e: Exception =>
             LOGGER.error(e, "Rename table failed: " + e.getMessage)
    -        if (carbonTable != null) {
    -          AlterTableUtil
    -            .revertRenameTableChanges(oldTableIdentifier,
    -              newTableName,
    -              carbonTable.getTablePath,
    -              carbonTable.getCarbonTableIdentifier.getTableId,
    -              timeStamp)(
    -              sparkSession)
    -          renameBadRecords(newTableName, oldTableName, oldDatabaseName)
    +        try {
    +          if (carbonTable != null) {
    +            AlterTableUtil
    +              .revertRenameTableChanges(oldTableIdentifier,
    --- End diff --
   
    please follow code convention:
    ```
         AlterTableUtil. revertRenameTableChanges(
             xxx,
             yyy
         )
    ```


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1734: [CARBONDATA-1912] Handling lock issues for al...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1734#discussion_r158956093
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableRenameCommand.scala ---
    @@ -156,15 +156,20 @@ private[sql] case class CarbonAlterTableRenameCommand(
         } catch {
           case e: Exception =>
             LOGGER.error(e, "Rename table failed: " + e.getMessage)
    -        if (carbonTable != null) {
    -          AlterTableUtil
    -            .revertRenameTableChanges(oldTableIdentifier,
    -              newTableName,
    -              carbonTable.getTablePath,
    -              carbonTable.getCarbonTableIdentifier.getTableId,
    -              timeStamp)(
    -              sparkSession)
    -          renameBadRecords(newTableName, oldTableName, oldDatabaseName)
    +        try {
    +          if (carbonTable != null) {
    +            AlterTableUtil
    +              .revertRenameTableChanges(oldTableIdentifier,
    +                newTableName,
    +                carbonTable.getTablePath,
    +                carbonTable.getCarbonTableIdentifier.getTableId,
    +                timeStamp)(
    +                sparkSession)
    +            renameBadRecords(newTableName, oldTableName, oldDatabaseName)
    +          }
    +        } catch {
    +          case e: Exception =>
    --- End diff --
   
    use finally, without catch


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1734: [CARBONDATA-1912] Handling lock issues for alter ren...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1734
 
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2589/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1734: [CARBONDATA-1912] Handling lock issues for alter ren...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1734
 
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2590/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1734: [CARBONDATA-1912] Handling lock issues for al...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ManoharVanam commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1734#discussion_r159024740
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableRenameCommand.scala ---
    @@ -156,15 +156,20 @@ private[sql] case class CarbonAlterTableRenameCommand(
         } catch {
           case e: Exception =>
             LOGGER.error(e, "Rename table failed: " + e.getMessage)
    -        if (carbonTable != null) {
    -          AlterTableUtil
    -            .revertRenameTableChanges(oldTableIdentifier,
    -              newTableName,
    -              carbonTable.getTablePath,
    -              carbonTable.getCarbonTableIdentifier.getTableId,
    -              timeStamp)(
    -              sparkSession)
    -          renameBadRecords(newTableName, oldTableName, oldDatabaseName)
    +        try {
    +          if (carbonTable != null) {
    +            AlterTableUtil
    +              .revertRenameTableChanges(oldTableIdentifier,
    +                newTableName,
    +                carbonTable.getTablePath,
    +                carbonTable.getCarbonTableIdentifier.getTableId,
    +                timeStamp)(
    +                sparkSession)
    +            renameBadRecords(newTableName, oldTableName, oldDatabaseName)
    +          }
    +        } catch {
    +          case e: Exception =>
    --- End diff --
   
    Here We need to release all old table acquired locks only in case of any exception.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1734: [CARBONDATA-1912] Handling lock issues for al...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ManoharVanam commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1734#discussion_r159025214
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableRenameCommand.scala ---
    @@ -156,15 +156,20 @@ private[sql] case class CarbonAlterTableRenameCommand(
         } catch {
           case e: Exception =>
             LOGGER.error(e, "Rename table failed: " + e.getMessage)
    -        if (carbonTable != null) {
    -          AlterTableUtil
    -            .revertRenameTableChanges(oldTableIdentifier,
    -              newTableName,
    -              carbonTable.getTablePath,
    -              carbonTable.getCarbonTableIdentifier.getTableId,
    -              timeStamp)(
    -              sparkSession)
    -          renameBadRecords(newTableName, oldTableName, oldDatabaseName)
    +        try {
    +          if (carbonTable != null) {
    +            AlterTableUtil
    +              .revertRenameTableChanges(oldTableIdentifier,
    +                newTableName,
    +                carbonTable.getTablePath,
    +                carbonTable.getCarbonTableIdentifier.getTableId,
    +                timeStamp)(
    +                sparkSession)
    +            renameBadRecords(newTableName, oldTableName, oldDatabaseName)
    +          }
    +        } catch {
    +          case e: Exception =>
    --- End diff --
   
    done


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1734: [CARBONDATA-1912] Handling lock issues for al...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ManoharVanam commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1734#discussion_r159025211
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableRenameCommand.scala ---
    @@ -156,15 +156,20 @@ private[sql] case class CarbonAlterTableRenameCommand(
         } catch {
           case e: Exception =>
             LOGGER.error(e, "Rename table failed: " + e.getMessage)
    -        if (carbonTable != null) {
    -          AlterTableUtil
    -            .revertRenameTableChanges(oldTableIdentifier,
    -              newTableName,
    -              carbonTable.getTablePath,
    -              carbonTable.getCarbonTableIdentifier.getTableId,
    -              timeStamp)(
    -              sparkSession)
    -          renameBadRecords(newTableName, oldTableName, oldDatabaseName)
    +        try {
    +          if (carbonTable != null) {
    +            AlterTableUtil
    +              .revertRenameTableChanges(oldTableIdentifier,
    --- End diff --
   
    done


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1734: [CARBONDATA-1912] Handling lock issues for alter ren...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1734
 
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2616/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1734: [CARBONDATA-1912] Handling lock issues for alter ren...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1734
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2428/



---
12