On 13 Jan 05:18, Wang Yngwie wrote: > I have a big targets file, it's about 8M size and there are more than > twenty thousand targetgroups. When Prometheus scans sd_files, my updating > program might writing that file simultaneously. In that case, the Discovery > process may read part of the file or encounter an error. Is it possible and > should I lock the targets file while updating it?
You should then create a .tmp.yml file, then move the file (rename) to the .yml, which is an atomic operation. > > -- > You received this message because you are subscribed to the Google Groups > "Prometheus Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/37552d38-afd6-4162-a7ee-4a3fb5262ad2n%40googlegroups.com. -- Julien Pivotto @roidelapluie -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/20210113132630.GA505668%40oxygen.

