Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

feat: Return full rlimit #301

Merged
merged 1 commit into from
May 31, 2022
Merged

Conversation

roneli
Copy link
Contributor

@roneli roneli commented May 31, 2022

🎉 Thank you for making CloudQuery awesome by submitting a PR 🎉

Summary

Related to https://github.com/cloudquery/cloudquery-issues/issues/372 returns full access to rlimit info on process

Use the following steps to ensure your PR is ready to be reviewed

  • Read the contribution guidelines 🧑‍🎓
  • Run go fmt to format your code 🖊
  • Lint your changes via golangci-lint run 🚨 (install golangci-lint here)
  • Update or add tests 🧪
  • Ensure the status checks below are successful ✅

@roneli roneli requested a review from a team as a code owner May 31, 2022 16:06
@roneli roneli requested review from spangenberg and removed request for a team May 31, 2022 16:06
@github-actions github-actions bot added feat and removed feat labels May 31, 2022
@roneli roneli requested review from erezrokah and removed request for spangenberg May 31, 2022 16:06
@github-actions github-actions bot added feat and removed feat labels May 31, 2022
Comment on lines +20 to +26
if err != nil || ulimit.Max == 0 {
return limit
}
if ulimit > limit {
if ulimit.Max > limit {
return limit
}
return ulimit
return ulimit.Max
Copy link
Contributor

Choose a reason for hiding this comment

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

On a seperate/ related note, instead of going all the way up to the ulimit why not do something like ulimit * 0.8 So then we don't try and take all of the descriptors because we know there are other things that use file descriptors other than our go routines

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can do that, will do in a separate pr

@kodiakhq kodiakhq bot merged commit 99b8c5e into cloudquery:main May 31, 2022
@roneli roneli deleted the feat-return-full-rlimit branch May 31, 2022 17:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants