Skip to content

Discard invalid tasks - #387

Merged
DZakh merged 1 commit into
mainfrom
dz/discard-invalid-tasks
Dec 17, 2024
Merged

Discard invalid tasks#387
DZakh merged 1 commit into
mainfrom
dz/discard-invalid-tasks

Conversation

@DZakh

@DZakh DZakh commented Dec 17, 2024

Copy link
Copy Markdown
Member

Currently it causes indexer freeze after preRegistration is done on the 2.11.3 pre-release.

I can explain in detail the problems with the old behavior on a call.

It's safe to discard all tasks with unmatching stateId.

Also, I've added support for ErrorExit action in the invalidatedActionReducer. Without it, the indexer couldn't gracefully crash during the rollback or when preRegistration is done.

@DZakh
DZakh requested a review from moose-code December 17, 2024 13:11
Comment on lines +46 to +47
S.taskReducer(self.state, task, ~dispatchAction=action =>
dispatchAction(~stateId, self, action)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could have stateId=0 and self.state with id 1, which would lead to invalid state in reducer. Maybe not critical in the latest envio version, but it caused a bug in the one I'm currently testing.

@DZakh
DZakh enabled auto-merge (squash) December 17, 2024 13:17
@DZakh
DZakh merged commit 4133be6 into main Dec 17, 2024
@DZakh
DZakh deleted the dz/discard-invalid-tasks branch December 17, 2024 13:21
@JonoPrest

Copy link
Copy Markdown
Collaborator

Wow good catch @DZakh

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

Successfully merging this pull request may close these issues.

3 participants