graphite-project / carbon

Carbon is one of the components of Graphite, and is responsible for receiving metrics over the network and writing them down to disk using a storage backend.
http://graphite.readthedocs.org/
Apache License 2.0
1.5k stars 490 forks source link

[Q] What is the dummy.txt used for? #897

Closed nikobearrr closed 4 years ago

nikobearrr commented 4 years ago

Hello, I can see I have a dummy.txt in the storage/whisper folder which shows in the grafana when looking at the graphite data source. I was wondering where it came from since I don't produce such metric so I found it here: https://github.com/graphite-project/carbon/blob/8af0b4f9eb62e2224926019edbcf1ea2cf0df31f/setup.py#L61

I am interested to know why is that there and why it needed?

ploxiln commented 4 years ago

The only purpose is so that the install process creates those directories. You might see a ".keep" file used for the same purpose by some other software projects on linux systems.

I think that the first step towards getting rid of the need for these "dummy.txt" files is https://github.com/graphite-project/carbon/pull/835

nikobearrr commented 4 years ago

Hi @ploxiln, thanks for the explanation. What was weird was that dummy.txt is it looks like a file, but indeed is a directory. However, your answer answers my question so I am closing this