Removing a registered or subscribed service leaves stale local metadata After a…
- User
Removing a registered or subscribed service leaves stale local metadata
After a successful unregister or unsubscribe operation, the corresponding provider or consumer URL must no longer participate in local metadata, service matching, or revision calculation. Removing one URL must preserve unrelated registrations. If the remote operation fails, local metadata must not be removed as though the operation succeeded.
Interface
Type: Function Name: RemoveService Path: metadata/metadata.go Input: registryId string, url *common.URL Output: (no return value) Description: Removes a provider service URL from the local metadata for the given registry. Use this during unregister flows to keep the in-memory application-level metadata consistent with the actual exported services.
Type: Function Name: RemoveSubscribeURL Path: metadata/metadata.go Input: registryId string, url *common.URL Output: (no return value) Description: Removes a subscribed service URL from the local metadata for the given registry. Use this during unsubscribe flows to ensure stale subscribed URLs are cleaned from the application-level metadata.
- Assistant
I’ll trace the metadata storage and unregister/unsubscribe call paths, then implement the removals and add focused regression tests for success, failure, and preservation of unrelated URLs.
- Assistant
rgisn’t installed in this checkout, so I’m using the repository’s available search tools. The metadata entry points currently only add URLs; next I’m locating the underlying keying and every remote-operation boundary so cleanup happens only after success. - Assistant
The underlying removal already existed but had two correctness gaps: it matched only pointer identity, and it deleted the service-match entry even when another registered URL still represented that service. I’m correcting those semantics and wiring the public functions only after successful service-discovery unregister/unsubscribe operations.
- Assistant
The focused suite is compiling now. The regression coverage includes value-equivalent URL removal, preservation of a second registration with the same match key, unknown-removal no-ops, and success/failure behavior at both remote operation boundaries.
- Assistant
The first test run hit the container’s process limit during parallel compilation, not a code failure. I’m rerunning the directly affected packages with constrained build parallelism.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.