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

Datapipe State Transition Hardening and ADCS Post Processing Fixes #363

Merged
merged 2 commits into from
Jan 30, 2024

Conversation

zinic
Copy link
Contributor

@zinic zinic commented Jan 29, 2024

Description

This adds an ingest task lookup before transitioning file upload jobs from the INGESTING state to the ANALYZING state. There is a potential race where a job may transition into INGESTING after ingestAvailableTasks(...) is called. In this rare case, ingest tasks would remain until the next datapipe loop tick. Upon ingestion of the remaining tasks analysis would not be triggered, leaving the system in a inconsistent state until the next analysis run.

Additionally, this changeset contains a change in the ADCS post-processing logic that defers creation of a parallel operation context. The functions that previously ran between creation of the parallel operation context would spin up their own parallel operation contexts resulting in creation of 12+ concurrent connections to the database. The system is designed to limit concurrent connections to 10 leaving some of the parallel operations hung until their association context is canceled.

Motivation and Context

State transition hardening will ensure there are no graph inconsistency gaps. The ADCS post-processing change will increase resiliency of the associated parallel operation code paths.

How Has This Been Tested?

Minor changes are covered by existing integration tests.

Types of changes

  • Chore (a change that does not modify the application functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Documentation updates are needed, and have been made accordingly.
  • I have added and/or updated tests to cover my changes.
  • All new and existing tests passed.
  • My changes include a database migration.

Copy link
Member

@computator computator left a comment

Choose a reason for hiding this comment

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

I don't know the details of the ADCS logic but the rest looks good!

Copy link
Contributor

@rvazarkar rvazarkar left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@urangel urangel left a comment

Choose a reason for hiding this comment

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

Thanks for the adcs post cleanup!

zinic added 2 commits January 30, 2024 10:51
…lel operation creation in adcs down to avoid opening too many connections
@zinic zinic force-pushed the datapipe-refactors branch from cedee97 to 1e67747 Compare January 30, 2024 18:51
@zinic zinic merged commit 3b4d780 into main Jan 30, 2024
3 checks passed
@zinic zinic deleted the datapipe-refactors branch January 30, 2024 19:28
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants