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);
}
Hi Cartman ... thanks for the bug report, I'll take a look