get unknown job when a client connect to more than one server

Bug #498042 reported by Cartman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman Java
Fix Released
High
Eric Lambert

Bug Description

When a client has more than one job servers, it will recieve some unknown job warns when incessancy sending not background jobs.

Root Cause:
In GearmanClientImpl, the key of 'Map<JobHandle, GearmanJobImpl> jobsMaps' is a job handle which is generated by a job server, but different job server may return same job handle, so more than one mappings will have only one mapping in the map

Solution: append some coonection's information to current JobHandle:
public JobHandle(byte[] handle, GearmanJobServerSession session) {
            this.handle = new byte[handle.length+4];
            System.arraycopy(handle, 0, this.handle, 0, handle.length);
            System.arraycopy(ByteUtils.toBigEndian(session.hashCode()), 0, this.handle, handle.length,4);
        }

Related branches

Cartman (kongchen)
Changed in gearman-java:
assignee: nobody → Cartman (kongchen)
Revision history for this message
Eric Lambert (elambert) wrote :

Hi Cartman ... thanks for the bug report, I'll take a look

Changed in gearman-java:
status: New → Won't Fix
Eric Lambert (elambert)
Changed in gearman-java:
status: Won't Fix → New
Eric Lambert (elambert)
Changed in gearman-java:
assignee: Cartman (kongchen) → Eric Lambert (elambert)
status: New → Confirmed
importance: Undecided → High
milestone: none → 0.04
Eric Lambert (elambert)
Changed in gearman-java:
status: Confirmed → Fix Committed
Eric Lambert (elambert)
Changed in gearman-java:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.