dgutierrez1287 / docker-yum-repo

Docker project for yum repo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

repo scan is triggered on rpm reads

peter-vaczi opened this issue · comments

Hi,
in scan_repo.rb the event notification is triggered by the ':close' event among others. ':close' is a shortcut for ':close_write' and ':close_nowrite'. The problem with this is that whenever an rpm file is downloaded from the repo a ':close_nowrite' event is triggered causing a repository update, which is incorrect since the repo content is not changed. This can cause a big load on the underlying disc. if you have a busy repo.
The solution is to use the ':close_write' instead of ':write'
br,
-ptr-

Can you show me the logs where this is happening, :close_nowrite happens if a file is opened for writing but no writing happened, to me a download should just be a read and not even open the file for writing.

Sorry reading that wrong, I will fix that in my next set of changes coming soon.

sounds great, thanks

Its been a long time coming but i completed and fully tested my re-write into go from ruby and it will wont do repo scans on read anymore.