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

Bug #498042 reported by Cartman on 2009-12-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman Java
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) on 2009-12-18
Changed in gearman-java:
assignee: nobody → Cartman (kongchen)
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) on 2009-12-18
Changed in gearman-java:
status: Won't Fix → New
Eric Lambert (elambert) on 2009-12-24
Changed in gearman-java:
assignee: Cartman (kongchen) → Eric Lambert (elambert)
status: New → Confirmed
importance: Undecided → High
milestone: none → 0.04
Eric Lambert (elambert) on 2010-09-10
Changed in gearman-java:
status: Confirmed → Fix Committed
Eric Lambert (elambert) on 2010-09-10
Changed in gearman-java:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers