Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-1356

Race conditions in QueryInProgress

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.10.0, 0.11.0
    • Fix Version/s: 0.10.0, 0.11.0
    • Component/s: TajoMaster
    • Labels:
      None

      Description

      TajoMasterClientService.getQueryResultData is intermittently failing due to a race condition. This issue can be fixed by removing unnecessary async condition and adding correctly synchronization in QueryInProgress.

      -------------------------------------------------------------------------------
      Test set: org.apache.tajo.engine.query.TestSortQuery
      -------------------------------------------------------------------------------
      Tests run: 23, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 40.597 sec <<< FAILURE! - in org.apache.tajo.engine.query.TestSortQuery
      testSortWithAlias3(org.apache.tajo.engine.query.TestSortQuery)  Time elapsed: 2.12 sec  <<< ERROR!
      java.sql.SQLException: com.google.protobuf.ServiceException: QueryInfo cannot be NULL.
              at org.apache.tajo.client.QueryClientImpl$3.call(QueryClientImpl.java:393)
              at org.apache.tajo.client.QueryClientImpl$3.call(QueryClientImpl.java:378)
              at org.apache.tajo.rpc.ServerCallable.withRetries(ServerCallable.java:94)
              at org.apache.tajo.client.QueryClientImpl.fetchNextQueryResult(QueryClientImpl.java:406)
              at org.apache.tajo.jdbc.FetchResultSet.nextTuple(FetchResultSet.java:66)
              at org.apache.tajo.jdbc.TajoResultSetBase.next(TajoResultSetBase.java:780)
              at org.apache.tajo.QueryTestCaseBase.resultSetToString(QueryTestCaseBase.java:497)
              at org.apache.tajo.engine.query.TestSortQuery.testSortWithAlias3(TestSortQuery.java:71)
      

        Activity

        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user jinossy opened a pull request:

        https://github.com/apache/tajo/pull/386

        TAJO-1356: Race conditions in QueryInProgress

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

        $ git pull https://github.com/jinossy/tajo TAJO-1356

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

        https://github.com/apache/tajo/pull/386.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 #386


        commit 91683a741f2e6c45feb0c4bed10b2011d80e3a00
        Author: jhkim <jhkim@apache.org>
        Date: 2015-02-23T08:59:26Z

        TAJO-1356: Race conditions in QueryInProgress


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user jinossy opened a pull request: https://github.com/apache/tajo/pull/386 TAJO-1356 : Race conditions in QueryInProgress You can merge this pull request into a Git repository by running: $ git pull https://github.com/jinossy/tajo TAJO-1356 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/386.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 #386 commit 91683a741f2e6c45feb0c4bed10b2011d80e3a00 Author: jhkim <jhkim@apache.org> Date: 2015-02-23T08:59:26Z TAJO-1356 : Race conditions in QueryInProgress
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user jihoonson commented on the pull request:

        https://github.com/apache/tajo/pull/386#issuecomment-75515650

        +1
        LGTM!

        Show
        githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on the pull request: https://github.com/apache/tajo/pull/386#issuecomment-75515650 +1 LGTM!
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/tajo/pull/386

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/386
        Hide
        jhkim Jinho Kim added a comment -

        Thank you for your quick review!

        Show
        jhkim Jinho Kim added a comment - Thank you for your quick review!
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-master-build #589 (See https://builds.apache.org/job/Tajo-master-build/589/)
        TAJO-1356: Race conditions in QueryInProgress. (jinho) (jhkim: rev fa20b6546322a8d4a7cbbe204726104c62890cc8)

        • CHANGES
        • tajo-core/src/main/java/org/apache/tajo/querymaster/QueryJobEvent.java
        • tajo-core/src/main/java/org/apache/tajo/master/QueryManager.java
        • tajo-core/src/main/java/org/apache/tajo/master/QueryInProgress.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-build #589 (See https://builds.apache.org/job/Tajo-master-build/589/ ) TAJO-1356 : Race conditions in QueryInProgress. (jinho) (jhkim: rev fa20b6546322a8d4a7cbbe204726104c62890cc8) CHANGES tajo-core/src/main/java/org/apache/tajo/querymaster/QueryJobEvent.java tajo-core/src/main/java/org/apache/tajo/master/QueryManager.java tajo-core/src/main/java/org/apache/tajo/master/QueryInProgress.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-master-CODEGEN-build #228 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/228/)
        TAJO-1356: Race conditions in QueryInProgress. (jinho) (jhkim: rev fa20b6546322a8d4a7cbbe204726104c62890cc8)

        • tajo-core/src/main/java/org/apache/tajo/master/QueryInProgress.java
        • tajo-core/src/main/java/org/apache/tajo/querymaster/QueryJobEvent.java
        • tajo-core/src/main/java/org/apache/tajo/master/QueryManager.java
        • CHANGES
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-CODEGEN-build #228 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/228/ ) TAJO-1356 : Race conditions in QueryInProgress. (jinho) (jhkim: rev fa20b6546322a8d4a7cbbe204726104c62890cc8) tajo-core/src/main/java/org/apache/tajo/master/QueryInProgress.java tajo-core/src/main/java/org/apache/tajo/querymaster/QueryJobEvent.java tajo-core/src/main/java/org/apache/tajo/master/QueryManager.java CHANGES

          People

          • Assignee:
            jhkim Jinho Kim
            Reporter:
            jhkim Jinho Kim
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development