JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report JPPF-58  -  JPPFResultCollector.setStatus(COMPLETE) is called twice for each job
Posted Sep 05, 2012 - updated Dec 27, 2014
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Bug report
  • Status
     
    Closed
  • Assigned to
    Not assigned to anyone
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     lolo4j
  • Owned by
    Not owned by anyone
  • Category
    Client
  • Resolution
    RESOLVED
  • Priority
    Normal
  • Reproducability
    Always
  • Severity
    Not determined
  • Targetted for
    icon_milestones.png JPPF 3.1.x
Issue description
With logging level set to DEBUG, I noticed that for each job, the status is changed twice to COMPLETE for each job. By setting a breakpoint in JPPFResultCollector.setStatus(), I could see that this method is called twice for SubmissionSTatus.COMPLETE, with the following stack traces:
org.jppf.client.concurrent.FutureResultCollector(org.jppf.client.JPPFResultCollector).setStatus(org.jppf.client.submission.SubmissionStatus) line: 236
org.jppf.client.concurrent.FutureResultCollector(org.jppf.client.JPPFResultCollector).resultsReceived(org.jppf.client.event.TaskResultEvent) line: 132
org.jppf.client.concurrent.FutureResultCollector.resultsReceived(org.jppf.client.event.TaskResultEvent) line: 137
org.jppf.client.balancer.ClientJob.resultsReceived(org.jppf.client.balancer.ClientTaskBundle, java.util.List<org.jppf.server.protocol.JPPFTask>) line: 292
org.jppf.client.balancer.ClientTaskBundle.resultsReceived(java.util.List<org.jppf.server.protocol.JPPFTask>) line: 217
org.jppf.client.balancer.ChannelWrapperRemote$RemoteRunnable.run() line: 277
java.util.concurrent.Executors$RunnableAdapter<T>.call() line: 471
java.util.concurrent.FutureTask$Sync.innerRun() line: 334
org.jppf.client.balancer.ChannelWrapperRemote$1(java.util.concurrent.FutureTask<V>).run() line: 166
java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) line: 1110
java.util.concurrent.ThreadPoolExecutor$Worker.run() line: 603
java.lang.Thread.run() line: 722
and
org.jppf.client.concurrent.FutureResultCollector(org.jppf.client.JPPFResultCollector).setStatus(org.jppf.client.submission.SubmissionStatus) line: 236
org.jppf.client.balancer.ClientJob.setSubmissionStatus(org.jppf.client.submission.SubmissionStatus) line: 426
org.jppf.client.balancer.ClientJob.taskCompleted(org.jppf.client.balancer.ClientTaskBundle, java.lang.Exception) line: 387
org.jppf.client.balancer.ClientTaskBundle.taskCompleted(java.lang.Exception) line: 235
org.jppf.client.balancer.ChannelWrapperRemote$RemoteRunnable.run() line: 301
java.util.concurrent.Executors$RunnableAdapter<T>.call() line: 471
java.util.concurrent.FutureTask$Sync.innerRun() line: 334
org.jppf.client.balancer.ChannelWrapperRemote$1(java.util.concurrent.FutureTask<V>).run() line: 166
java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) line: 1110
java.util.concurrent.ThreadPoolExecutor$Worker.run() line: 603
java.lang.Thread.run() line: 722


Steps to reproduce this issue
  • set logging level to DEBUG for the client
  • submit a job
  • look at the client log file for messages "job JPPFJob... fire status changed event for 'COMPLETE'"

#3
Comment posted by
 lolo4j
Sep 05, 06:54
For the time being, I added protection code as follows:
if (newStatus == this.status) return;


#4
Comment posted by
 jandam
icon_reply.pngSep 05, 10:05, in reply to comment #3
I think it could be intentional to keep notifications same as in old load balancer. Status should not be changed by JPPFResultCollector at all.

lolo4j wrote:
For the time being, I added protection code as follows:
if (newStatus == this.status) return;



#5
Comment posted by
 lolo4j
Sep 14, 10:28
Fixed. Changes committed to SVN:

The issue was updated with the following change(s):
  • This issue has been closed
  • The status has been updated, from New to Closed.
  • This issue's progression has been updated to 100 percent completed.
  • The resolution has been updated, from Not determined to RESOLVED.