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

Fixes #21665: When we receive a lot of inventories, inotify "OVERFLOW" is not handled #4457

Conversation

fanf
Copy link
Member

@fanf fanf commented Aug 30, 2022

https://issues.rudder.io/issues/21665

the correction is to handle the OVERFLOW event kind and trigger the clean-up process on it. We wait a bit before doing that, because if we got OVERFLOW, likely the server is very busy.
That need a bit of refactoring for the clean-up process: now, one part knows all about cleaning, and the other is just the scheduling.

Also handle the exception case for inotify with an error log.

@fanf fanf requested a review from ncharles August 30, 2022 10:37
@fanf
Copy link
Member Author

fanf commented Aug 30, 2022

PR updated with a new commit


// if the listing fails, just exit
children <- ZIO.foreach(directories)(d => IOResult.effect(FileUtils.listFilesAndDirs(
d.toJava,
Copy link
Member

Choose a reason for hiding this comment

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

   children <-  ZIO.foreach(directories)( d =>
                        IOResult.effect(
                          FileUtils.listFilesAndDirs(d.toJava, TrueFileFilter.TRUE, TrueFileFilter.TRUE  ).asScala
                        )
                     )

would be easier to read (cannot make suggestion on multiple lines ...

Copy link
Member

Choose a reason for hiding this comment

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

not perfect indentation though, quite complicated to write through github

Copy link
Member Author

Choose a reason for hiding this comment

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

hum, it seems that intellij changed indentation when it should have not, what a mess

Copy link
Member Author

Choose a reason for hiding this comment

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

that part didn't change, I only move it up

Copy link
Member

Choose a reason for hiding this comment

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

Yes , i have seen that it was just moved, and reindent, and yes it clearly feels that it was not rewritten by you !!

@fanf
Copy link
Member Author

fanf commented Aug 31, 2022

PR updated with a new commit

@fanf fanf force-pushed the ust_21665/when_we_receive_a_lot_of_inventories_inotify_overflow_is_not_handled branch from 0d6e6c8 to 46d075e Compare August 31, 2022 13:24
@Normation-Quality-Assistant
Copy link
Contributor

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit 377017d into Normation:branches/rudder/7.2 Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants