Skip to content

Too many refresh events published from ConfigWatch #223

@dahamr

Description

@dahamr

We have a reasonably complex set of services all of which are configured to watch for consul changes. Because of #183, I've been looking for ways to reduce the number of refresh events.

What I've noticed is that refresh events are issued when no KVs related to the service have changed. I found that if a prefix does not exist, the X-Consul-Index value could match the ModifyIndex of a key in a completely different area. In that case, the query made to consul returns a 404 along with new X-Consul-Index. The refresh events I am questing all seem to be related to missing prefixes.

I'm wondering if it is necessary to publish a refresh event in this scenario where the value is null and the query to check for the prefix returns a 404? I tested the minor change to ConfigWatch to skip the refresh if the value is null and it seems to work like I'd want.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions