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

fix: enforce max query queue size to avoid panic #20157

Closed
wants to merge 4 commits into from

Conversation

danxmoran
Copy link
Contributor

Closes #20145

The max value I picked is pretty strange, and if you actually try to use it the system tries to allocate TBs of memory and OOMs, but I couldn't think of a better (explainable) option.

Copy link
Contributor

@davidby-influx davidby-influx left a comment

Choose a reason for hiding this comment

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

Looks good.

// MaxQueryQueueSize is the max allowable value for QueueSize
// in controller config. The setting was found by trial-and-error,
// it's the max size that can be passed to `makechan` for a channel
// of struct pointers (also of int64s) without hitting a panic.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you provide more info on the panic location so we can track future improvements to GoLang and possibly change this? Is there a known issue in GoLang we could reference, for instance?

@danxmoran
Copy link
Contributor Author

@davidby-influx I'm going to close this one, and push a different implementation into #20149. The type-driven implementation should work for both.

@danxmoran danxmoran closed this Nov 24, 2020
@danxmoran danxmoran deleted the dm-query-queue-size-max-20145 branch November 24, 2020 15:05
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.

Panic when setting --query-queue-size to a large value
2 participants