Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In case of SCDF Local Deployment, if the SCDF server goes down in between job execution, the STATE of job gets stuck at STARTED even after restart. #5502

Open
PSHREYASHOLLA opened this issue Oct 10, 2023 · 4 comments
Labels
type/enhancement Is an enhancement request

Comments

@PSHREYASHOLLA
Copy link

This is in reference to #5498.
Trying out the sample BillRun application available as part of https://dataflow.spring.io/docs/batch-developer-guides/batch/data-flow-spring-batch/.

Now we want to check the behavior of a job if the SCDF server crashes.

So for the same I have modified BillProcessor class to add a delay of 2 minutes before the 3rd record is added to the database like,
public class BillProcessor implements ItemProcessor<Usage, Bill> {

@OverRide
public Bill process(Usage usage) {
if(usage.getFirstName().equals("michael"))
{
try {
Thread.sleep(120000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

Double billAmount = usage.getDataUsage() * .001 + usage.getMinutes() * .01;
return new Bill(usage.getId(), usage.getFirstName(), usage.getLastName(),
usage.getDataUsage(), usage.getMinutes(), billAmount);
}
}

Now we launch the billRun task and the batch inserts the first 2 records into the DB and goes to sleep for 2 minutes,
image

We bring down the server now. After server restart the job execution status remains as STARTED,
image

So now its neither continuing on server startup with this status nor its allowing me to restart as the button is disabled,
image

So there should be a way to correct the STATUS of the job and option to restart the same from where it was left.

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Oct 10, 2023
@corneil
Copy link
Contributor

corneil commented Oct 11, 2023

When running locally dataflow launches the application and when stopping dataflow, this also stops the task.

@PSHREYASHOLLA
Copy link
Author

@corneil , But task stays in STARTED status and it does not allow to restart the task.

@cppwfs
Copy link
Contributor

cppwfs commented Oct 11, 2023

This would be an API addition to dataflow to set the state of the task execution to the desired state.

@PSHREYASHOLLA
Copy link
Author

This would be an API addition to dataflow to set the state of the task execution to the desired state. >>>> Can you please tell me if it will be taken up any time soon?

@cppwfs cppwfs removed the status/need-triage Team needs to triage and take a first look label Oct 18, 2023
@cppwfs cppwfs added type/enhancement Is an enhancement request and removed type/feature labels Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Is an enhancement request
Projects
None yet
Development

No branches or pull requests

3 participants