Skip to content

Proper default value for skipLimit #4661

Closed
@samuelstein

Description

@samuelstein

Recently I stumbled over the default value of the skipLimit in the class FaultTolerantStepBuilder. It is set by default to 0.
If you don't use a SkipPolicy and configure it instead with skip(Exception.class) it is very easy to forget setting the additional property skipLimit.
Could you provide a more suitable default value?
My suggestion would be Integer.MAX_VALUE.
What do you think?

Activity

fmbenhassine

fmbenhassine commented on Sep 16, 2024

@fmbenhassine
Contributor

That's a valid point, thank you for raising it!

My suggestion would be Integer.MAX_VALUE

This means that by default we would theoretically allow the entire dataset to be skipped, which in turn means there is something fundamentally wrong with the input (bad data format, unexpected input, etc). As a user, I would prefer my job to fail fast in the first dozen or hundred skips rather than waiting until the end just to discover that my job was skipping the entire data set. Do you see my point?

I guess 10 or 100 is a reasonable default. Wdyt?

I will plan the change in the next minor release.

modified the milestones: 5.2.0, 5.2.0-M2 on Sep 16, 2024
samuelstein

samuelstein commented on Sep 17, 2024

@samuelstein
Author

Hi @fmbenhassine,
this makes abolutely sense to me. I would prefer at least 10. Then you have a good balance between fail-fast and misconfiguration.

Ian3110

Ian3110 commented on Sep 22, 2024

@Ian3110
Contributor

I have opened a pull request that addresses this issue: #4668

removed this from the 5.2.0-RC1 milestone on Oct 23, 2024

6 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @fmbenhassine@samuelstein@Ian3110

        Issue actions

          Proper default value for skipLimit · Issue #4661 · spring-projects/spring-batch