If client doesn't send UUID server will fail to add job to QUEUE

Bug #1211321 reported by Omid Mottaghi on 2013-08-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman
Undecided
Brian Aker

Bug Description

I get this error on Fedora and Debian distros, compiled version 1.1.9 from source.
I'm using PHP PECL extention to communicate with Gearman Server.

Omid Mottaghi (omidmottaghi) wrote :

error log says:

DETAIL: Key (unique_key, function_name)=(, send_sms) already exists.
 -> libgearman-server/plugins/queue/postgres/queue.cc:293
  ERROR 2013-08-12 14:23:29.000000 [ proc ] gearman_server_job_add gearman_server_run_command(QUEUE_ERROR) -> libgearman-server/server.cc:297
  ERROR 2013-08-12 14:23:30.000000 [ proc ] PQexec:ERROR: duplicate key value violates unique constraint "queue_unique_key_function_name_key"

Brian Aker (brianaker) wrote :

Does the log show that the unique had been processed already?

Brian Aker (brianaker) on 2013-08-15
Changed in gearmand:
status: New → Incomplete
assignee: nobody → Brian Aker (brianaker)
Omid Mottaghi (omidmottaghi) wrote :

I cannot understand what you say.

As you can see in log file, it cannot generate unique id
Key (unique_key, function_name)=(, send_sms)

Hi,

Let me see if I can manufacture this error. In theory if there is already a task with this unique value then the task will just coalesce.

If somehow a job got in the queue and wedged itself… I am just not sure how that would happen.

Cheers,
 -Brian

On Aug 16, 2013, at 2:14 AM, Omid Mottaghi <email address hidden> wrote:

> I cannot understand what you say.
>
> As you can see in log file, it cannot generate unique id
> Key (unique_key, function_name)=(, send_sms)
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1211321
>
> Title:
> _client_run_tasks(GEARMAN_QUEUE_ERROR) QUEUE_ERROR:QUEUE_ERROR ->
> libgearman/client.cc:1594
>
> Status in Gearman Server and Client Libraries:
> Incomplete
>
> Bug description:
> I get this error on Fedora and Debian distros, compiled version 1.1.9 from source.
> I'm using PHP PECL extention to communicate with Gearman Server.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gearmand/+bug/1211321/+subscriptions

"Key (unique_key, function_name)=(, send_sms)"

Just reread this. Are you sure you have uuid support compiled in? I.E> confirm that the client actually generated a UUID for the job. If the client doesn't... well the server would fail to insert because of that lack of a key (which I guess the server could generate the ID...)

summary: - _client_run_tasks(GEARMAN_QUEUE_ERROR) QUEUE_ERROR:QUEUE_ERROR ->
- libgearman/client.cc:1594
+ If client doesn't send UUID server will fail to add job to QUEUE
Omid Mottaghi (omidmottaghi) wrote :

I cannot find anything in "./configure --help" about uuid.
I've compiled version 1.1.9 and it used "gperf", if it is related to this discussion!

How can I find if client generate an ID or not? Without persistent storage, everything goes OK, but it happened with persistent storage.

And thanks for your support :-)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers