Gearman Server and Client Libraries

Verify store queue on shutdown

Reported by Brian Aker on 2012-12-07
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Gearman
Medium
Brian Aker

Bug Description

Verify that we are storing the queue on shutdown if asked.

The test case creates eight jobs and then checks to before shutting down the server that sqlite is empty. The test then shuts down the server and checks to see if they jobs are there. It then starts up the server and verifies that the jobs are processed.

Brian Aker (brianaker) on 2012-12-07
Changed in gearmand:
milestone: none → 1.1.4
assignee: nobody → Brian Aker (brianaker)
importance: Undecided → Medium
status: New → In Progress
Brian Aker (brianaker) on 2012-12-07
description: updated
Brian Aker (brianaker) on 2012-12-13
Changed in gearmand:
status: In Progress → Fix Committed
Sven Nierlein (sven-nierlein) wrote :

I cannot confirm this is working.

%> ./gearmand/gearmand --store-queue-on-shutdown --libsqlite3-db=/tmp/gearman.sql --port 4731 -l stderr -q libsqlite3
%> echo "blah" | ./bin/gearman -f test -h localhost -p 4731 -b

-> then there is a job in the sqlite database but it shouldn't be.

(tried with release 1.1.4)

Trying with just
%> ./gearmand/gearmand --store-queue-on-shutdown --libsqlite3-db=/tmp/gearman.sql --port 4731 -l stderr
does not store anything.

Hi,

What steps are you doing?

There is a test case covering functionality, but maybe something was missed.

Cheers,
 -Brian

On Dec 20, 2012, at 8:00 AM, Sven Nierlein <email address hidden> wrote:

> I cannot confirm this is working.
>
> %> ./gearmand/gearmand --store-queue-on-shutdown --libsqlite3-db=/tmp/gearman.sql --port 4731 -l stderr -q libsqlite3
> %> echo "blah" | ./bin/gearman -f test -h localhost -p 4731 -b
>
> -> then there is a job in the sqlite database but it shouldn't be.
>
> (tried with release 1.1.4)
>
> Trying with just
> %> ./gearmand/gearmand --store-queue-on-shutdown --libsqlite3-db=/tmp/gearman.sql --port 4731 -l stderr
> does not store anything.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1087654
>
> Title:
> Verify store queue on shutdown
>
> Status in Gearman Server and Client Libraries:
> Fix Committed
>
> Bug description:
> Verify that we are storing the queue on shutdown if asked.
>
> The test case creates eight jobs and then checks to before shutting
> down the server that sqlite is empty. The test then shuts down the
> server and checks to see if they jobs are there. It then starts up the
> server and verifies that the jobs are processed.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gearmand/+bug/1087654/+subscriptions

Sven Nierlein (sven-nierlein) wrote :

You can reproduce it like this:

1. start gearmand
./gearmand/gearmand --store-queue-on-shutdown --libsqlite3-db=/tmp/gearman.sql --port 4731 -l stderr -q libsqlite3

2. open a second shell and verify the queue is empty:
echo "select count(*) from gearman_queue;" | sqlite3 /tmp/gearman.sql
should be zero.

3. submit a new background job
echo "blah" | ./bin/gearman -f test -h localhost -p 4731 -b

4. check sqlite table again:
echo "select count(*) from gearman_queue;" | sqlite3 /tmp/gearman.sql
should still be zero but this time it's 1 although gearmand is still running.

Brian Aker (brianaker) on 2013-08-15
Changed in gearmand:
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