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

ConcurrentModificationException in TaskScheduler

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.2-incubating
    • Fix Version/s: 0.8.0
    • Component/s: QueryMaster
    • Labels:
      None

      Description

      TaskSchedulerImpl.java throws ConcurrentModificationException while assigning task.

      
      2013-10-31 14:29:04,411 INFO  querymaster.Query (Query.java:handle(447)) - Processing q_1383197276362_0001 of type INIT_COMPLETED
      Exception in thread "Thread-23" 2013-10-31 14:29:04,536 INFO  event.TaskS
              at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
              at java.util.HashMap$KeyIterator.next(HashMap.java:828)
              at org.apache.tajo.master.TaskSchedulerImpl$ScheduledRequests.assignToNonLeafTasks(TaskSchedulerImpl.java:505)
              at org.apache.tajo.master.TaskSchedulerImpl.schedule(TaskSchedulerImpl.java:201)
      
      1. TAJO-295_2.patch
        4 kB
        Jinho Kim
      2. TAJO-295_3.patch
        4 kB
        Jinho Kim
      3. TAJO-295.patch
        3 kB
        Jinho Kim

        Activity

        Hide
        jhkim Jinho Kim added a comment -

        I've attached the patch. and verified 'mvn clean install'.

        Show
        jhkim Jinho Kim added a comment - I've attached the patch. and verified 'mvn clean install'.
        Hide
        jihoonson Jihoon Son added a comment -

        +1

        This patch looks good to me.

        Show
        jihoonson Jihoon Son added a comment - +1 This patch looks good to me.
        Hide
        hyunsik Hyunsik Choi added a comment -

        ConcurrentSkipListSet keeps the data items in some sorted order. Is there no side effect?

        Show
        hyunsik Hyunsik Choi added a comment - ConcurrentSkipListSet keeps the data items in some sorted order. Is there no side effect?
        Hide
        jhkim Jinho Kim added a comment -

        I think there is no side effect because datalocation and fetch url is not ordered. but i will change it clearly

        Show
        jhkim Jinho Kim added a comment - I think there is no side effect because datalocation and fetch url is not ordered. but i will change it clearly
        Hide
        jhkim Jinho Kim added a comment -

        I've attached the second patch.

        Show
        jhkim Jinho Kim added a comment - I've attached the second patch.
        Hide
        jihoonson Jihoon Son added a comment -

        You look forget to add the following code.

        leafTasks.remove(attemptId);
        
        Show
        jihoonson Jihoon Son added a comment - You look forget to add the following code. leafTasks.remove(attemptId);
        Hide
        hyunsik Hyunsik Choi added a comment -

        +1 for the last patch. That will eliminate the problem and potential concurrency problems caused by the rescheduled tasks. I've verified 'mvn clean install'.

        Show
        hyunsik Hyunsik Choi added a comment - +1 for the last patch. That will eliminate the problem and potential concurrency problems caused by the rescheduled tasks. I've verified 'mvn clean install'.
        Hide
        hyunsik Hyunsik Choi added a comment - - edited

        Also, your patch needs to include Jihoon's fix before the commit.

        Show
        hyunsik Hyunsik Choi added a comment - - edited Also, your patch needs to include Jihoon's fix before the commit.
        Hide
        jhkim Jinho Kim added a comment -

        Jihoon,
        Thank you for nice finding. I've added it.

        Show
        jhkim Jinho Kim added a comment - Jihoon, Thank you for nice finding. I've added it.
        Hide
        jhkim Jinho Kim added a comment -

        Thanks Guys for the review. I've just committed it.

        Show
        jhkim Jinho Kim added a comment - Thanks Guys for the review. I've just committed it.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-trunk-postcommit #546 (See https://builds.apache.org/job/Tajo-trunk-postcommit/546/)
        TAJO-295: ConcurrentModificationException in TaskScheduler. (jinho) (jinossy: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=5dbdd26d76786b22aea38bebfa0b5ad460eebddd)

        • CHANGES.txt
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TaskSchedulerImpl.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-trunk-postcommit #546 (See https://builds.apache.org/job/Tajo-trunk-postcommit/546/ ) TAJO-295 : ConcurrentModificationException in TaskScheduler. (jinho) (jinossy: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=5dbdd26d76786b22aea38bebfa0b5ad460eebddd ) CHANGES.txt tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TaskSchedulerImpl.java

          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