Thanks for your reply very much, it really helps. ☺

Julien Pivotto <[email protected]> 于2021年1月13日周三 下午9:26写道:

> 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/CAC0bqNygxVaDywfMihFLCr6QFHCSLfjbY%3DqwZwXAr1h794ou1A%40mail.gmail.com.

Reply via email to