go-graphite / go-carbon

Golang implementation of Graphite/Carbon server with classic architecture: Agent -> Cache -> Persister
MIT License
804 stars 123 forks source link

What's the status of `priority` in storage-schemas.conf? #275

Open vide opened 5 years ago

vide commented 5 years ago

Hello

doing empirical tests + looking at go-carbon code looks like that you indeed follow the priority value in the storage-schemas.conf definitions.

For example

[should_apply_first]
pattern = ^stats\..*
priority = 1
retentions = 10s:1h

[should_not_apply_to_stats]
pattern = ^.*
priority = 10
retentions = 60s:1d

will apply a retention of 1 minute for 1 day to every metric received, when the one matched by the first section should be applied first. According to https://github.com/graphite-project/carbon/issues/12 they should matched in order. The official documentation states the same: section order is the only source of truth for ordering. I understand that in some past carbon versions there was that priority field (and actually I like it!) but looks like that right now go-carbon is not a full drop-in replacement for whisper-carbon.

lomik commented 5 years ago

You can simply remove the priority field from your config and the behavior will be the same as that of the python-carbon.

vide commented 5 years ago

Yeah, that's obvious :smile: But migrating from an already existing install of whisper-carbon to go-carbon (with priorities already set) I found this the hard way.