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

Improve uploader queue to respect queue size instead of waiting for idle #400

Merged
merged 2 commits into from
Dec 18, 2020

Conversation

austinkelleher
Copy link
Contributor

Put this in a separate PR as it will be easier to review and manage any feedback.

See here for motivation (thanks @mknoedel!): https://github.com/JupiterOne/sdk/pull/396/files#r545299685

I also decided to make some additional changes to the behavior around when we allow additional tasks to be pushed into the queue. I think it makes more sense to not fail as fast as we can, but rather take the approach that we should upload as much data for a step as possible as we are already going to mark it as partial. The J1 synchronizer will handle edge cases that would cause issues (e.g. a relationship gets uploaded and one/both of the related entities failed to upload).

This idea is similar to the idea that we should be moving towards a world where integration steps do not fail fast in general (perhaps some cases where necessary, e.g. authentication failure). We should try to collect as much data as we can regardless of a failure. As long as the step is tracking these errors and ultimately throws at the end, we will be able to potentially upload a lot more data than we would have otherwise because of a single error. That is more of a bigger thought/development style change, but it has become particularly important in the Qualys integration where simply re-running the entire integration upon an intermittent failure (or even non-intermittent) is not a great option.

@austinkelleher austinkelleher merged commit e3d379a into 1786-optimize-flushing Dec 18, 2020
@austinkelleher austinkelleher deleted the 1896-queue-size branch December 18, 2020 16:43
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