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
PR updated with a new commit |
.../rudder/rudder-core/src/main/scala/com/normation/rudder/inventory/InventoryFileWatcher.scala
Outdated
Show resolved
Hide resolved
.../rudder/rudder-core/src/main/scala/com/normation/rudder/inventory/InventoryFileWatcher.scala
Outdated
Show resolved
Hide resolved
|
||
// if the listing fails, just exit | ||
children <- ZIO.foreach(directories)(d => IOResult.effect(FileUtils.listFilesAndDirs( | ||
d.toJava, |
There was a problem hiding this comment.
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 ...
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 !!
PR updated with a new commit |
…W\" is not handled
0d6e6c8
to
46d075e
Compare
OK, merging this PR |
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 gotOVERFLOW
, 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.