JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report JPPF-488  -  Priority of client connection pools is not respected
Posted Feb 08, 2017 - updated Feb 16, 2017
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
     lolo4j
  • 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
    Normal
  • Targetted for
    icon_milestones.png JPPF 5.2.5
Issue description
When, in the client configuration, 2 or more connection pools are defined with different priorities, jobs are not always sent to the pools with the hhighest priority.

There are two scenarios in which this happens:
  • when jobs are submitted while the client is initializing, it is possible that at this time only connections with a lower priority are established, in which case they are still considered to be at the highest priority
  • when all connections of the pool with the highest priority are busy, they are in fact removed from the idle connections map. This map is a sorted multimap whose key is the priority and value is a collection of connections to a server. When a connection is selected to execute a job, it is removed from the collection, and when the collection is empty, it is removed from the map, which changes the highest priority found in the map. If more jobs are to be executed, they will therefore be sent to connections with don't have the highest priority as defined in the configuration.
Steps to reproduce this issue
  • 2 drivers, 1 node each
  • client defined with 2 connections pools with different priorities
  • submit n non-blocking jobs, where n >= sum(pools sizes)
  • use a JobListener and override jobDispatched() to display which connection pool (i.e. driver) the job is dispatched to
==> you will see that jobs are dispatched to both drivers instead of just the one with the highest priority

#3
Comment posted by
 lolo4j
Feb 16, 09:01
Fixed in: