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

Jobs that suceed on the last try create items stuck at processing state #2471

Open
v6ak opened this issue Jan 27, 2024 · 0 comments
Open

Jobs that suceed on the last try create items stuck at processing state #2471

v6ak opened this issue Jan 27, 2024 · 0 comments

Comments

@v6ak
Copy link
Contributor

v6ak commented Jan 27, 2024

Steps:

  1. Pick some file that can be successfully processed.
  2. Adjust the environment, so that the file succeeds on the last try. (Trivial way: set retries = 0)
  3. Upload the file.

Expected results

The job is successful and the item is created.

Actual results

The job is successful, but the item isn't visible. When I look into the DB, the item is still in processing state.

Analysis

IIUC, in case of isLastRetry, the job is processed in slightly different way.

a. When some retries are remaining, the item state is updated (.flatMap(itemStateTask(store, ItemState.Created)))
b. When no retry is remaining and the job fails, the state is also updates (.flatMap(_ => itemStateTask(store, ItemState.Created)(data)))
c. When no retry is remaining and the job succeeds, I don't see such code.

In my case, I had retries=0, because it creates more readable logs (exceptions aren't repeated for each attempt). With retries>0, you usually don't hit the bug, as most jobs probably either succeed at the first attempt or fail on all attempts.

@v6ak v6ak changed the title Jobs that suceed on the last try create items stuck at ` Jobs that suceed on the last try create items stuck at processing state Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant