Skip to content

ApplicationService > ListenForCustomConfigChanges > Delete from map is not working #1676

Open
@EdoardoLenzi9

Description

@EdoardoLenzi9

🐞 Bug Report

Affected Services: ApplicationService

The issue is located in: ListenForCustomConfigChanges callback

Is this a regression?

No

Description and Minimal Reproduction

In an ApplicationService the ListenForCustomConfigChanges seems to have a bug on DELETE event.

Given a data structure of this form:

type Foo struct {
	Bar            string // any content
}

type Config struct {
	Foos map[string]Foo // map[string]Anystruct
}

When I delete from the Consul an item of Foos it is still present in the ListenForCustomConfigChanges callback (probably cached).

Therefore the state of the App is not consistent with the actual state (Consul state).

When I restart the service the map Foos is consistent with Consul again.

🔥 Exception or Error

None

🌍 Your Environment

Deployment Environment: standard edgex

EdgeX Version: v3.2.0-dev.48

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions