Indexer ignores a file after moving it away and back shortly after
Today I tried to trigger the new Nagios CollecTor check by moving away a recent Snowflake file and moving it back a few minutes later.
The first part of moving the file away worked fine to the effect that it was not included in the
index.json file anymore.
However, the second part of moving the file back did not cause the indexer to include the file in the
index.json file again.
What I had to do was touch the file and setting a slightly different last-modified timestamp. More precisely, changing the second was not sufficient, but changing the minute was.
I haven't looked at the code yet, but I could imagine that it's related to some optimization we did about not indexing files that we had already indexed before. Maybe it's also related to the way how we keep files available for a certain time after they dropped out of the
index.json file. Or maybe it's caused by both.
This is not a critical bug, but it's also likely not a complex fix. It would be good to fix this, because it would probably confuse another CollecTor operator who didn't happen to write the indexer code.