pgagent job failing to halt on failed step

From: Sanket Mehta <sanket(dot)mehta(at)enterprisedb(dot)com>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: pgagent job failing to halt on failed step
Date: 2015-12-01 05:36:32
Message-ID: CA+yw=mP_qCXAoxwpPLWh81_9h=9FyX869=pF68mL9RA-6=oJfw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi,

There is an issue in current pgagent code as explained below:

Issue:
In batch mode if user creates a job with multiple job steps then if first
jobstep gets executed successfully then even if 2nd step is a failure, job
will not halt at that point and will complete its execution. which is not
the expected result.

Analysis:
The main reason for this issue is that in batch mode, when first step is
executed successfully, flag *succeeded *will be set to true, but when the
2nd step gets failed, its not getting reset to false which is why job does
not halt at the same instance and continues executing next steps.

I have resolved this issue and patch is attached with this mail for review.
Please do review the patch and let me know in case anything is missing.
Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb

Attachment Content-Type Size
pgagent_job_failing_to_halt.patch text/x-patch 537 bytes

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Ashesh Vashi 2015-12-01 06:12:00 pgAgent commit: Set 'succeeded' flag to true/false by checking for the
Previous Message Dave Page 2015-11-30 13:08:38 Re: SSH tunnel key exchange methods