Subitting a Background Job does not fail after gearman has been closed

Bug #602230 reported by Stelios Tzivakis on 2010-07-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman Java
Medium
Eric Lambert

Bug Description

In GearmanClientImpl in method " public <T> Future<T> submit(Callable<T> task) " - subitting a backgroynd job
the code does not throw an error when gearman is down, It return a (Future<T> job) instead and just logs the IOException occured.

So there is no way to tell if gearman is up or down because this always succeds.

Reproducing the situation
---------------
Gearm is up
Client connects to Gearman
We Shitdown gearman
Client submits a background job

try {

    GearmanJob job = GearmanJobImpl.createBackgroundJob (
      functionToCall,
      requestPayload.getBytes(),
      uniqueId);

    f = client.submit(job);

  } catch (Exception e) {
    comResponse.setErrNo(ComResponse.ERR_SYSTEM_FAIL);
    comResponse.setErrMessage(e.getMessage());
    return comResponse;
  }

Code does not reach the catch statement

Related branches

description: updated
summary: - Subitting a Background Job does not fail after gearmnah has been closed
+ Subitting a Background Job does not fail after gearman has been closed
Eric Lambert (elambert) on 2010-07-23
Changed in gearman-java:
importance: Undecided → Medium
assignee: nobody → Eric Lambert (elambert)
Eric Lambert (elambert) wrote :

In theory this scenario should result in a rejectedExecutionException, will take a look

Changed in gearman-java:
milestone: none → 0.04

Thank you very much
Stelios Tzivakis

On Wed, Aug 11, 2010 at 9:43 AM, Eric Lambert <email address hidden> wrote:
> In theory this scenario should result in a rejectedExecutionException,
> will take a look
>
> ** Changed in: gearman-java
>    Milestone: None => 0.04
>
> --
> Subitting a Background Job does not fail after gearman has been closed
> https://bugs.launchpad.net/bugs/602230
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Gearman Java: New
>
> Bug description:
> In GearmanClientImpl in method " public <T> Future<T> submit(Callable<T> task) " - subitting a backgroynd job
> the code does not throw an error when gearman is down, It return a (Future<T> job)  instead and just logs the IOException occured.
>
> So there is no way to tell if gearman is up or down because this always succeds.
>
> Reproducing the situation
> ---------------
> Gearm is up
> Client connects to Gearman
> We Shitdown gearman
> Client submits a background job
>
> try {
>
>     GearmanJob job = GearmanJobImpl.createBackgroundJob (
>       functionToCall,
>       requestPayload.getBytes(),
>       uniqueId);
>
>     f = client.submit(job);
>
>   } catch (Exception e) {
>     comResponse.setErrNo(ComResponse.ERR_SYSTEM_FAIL);
>     comResponse.setErrMessage(e.getMessage());
>     return comResponse;
>   }
>
> Code does not reach the catch statement
>
>
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/gearman-java/+bug/602230/+subscribe
>

Eric Lambert (elambert) on 2010-08-12
Changed in gearman-java:
status: New → Confirmed
Eric Lambert (elambert) on 2010-09-08
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