Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4a0ec86
fix(metadata): make GetMetadataReport() deterministic in multi-regist…
XnLemon Jun 3, 2026
3e9ebc6
fix(metadata): Remove() fans out to all reports, consistent with Map()
XnLemon Jun 3, 2026
7ff288d
fix(metadata): thread registryId through GetMetadataFromMetadataRepor…
XnLemon Jun 4, 2026
4e83c0c
fix(metadata): scope revision calculation to per-registry services, t…
XnLemon Jun 4, 2026
7ebc49f
fix(metadata): GetMetadataReportByRegistry returns nil for unknown re…
XnLemon Jun 4, 2026
8008879
fix(metadata): ServiceNameMapping.Remove collects all errors instead …
XnLemon Jun 4, 2026
38ab94b
test: expand coverage for per-registry metadata report selection
XnLemon Jun 4, 2026
9ec6abc
chore: translate Chinese comments to English, remove UTF-8 BOM
XnLemon Jun 4, 2026
2388f30
style(metadata): fix import formatting
XnLemon Jun 4, 2026
663d4cf
fix(registry): upgrade missing-registryId log from Warn to Error with…
XnLemon Jun 4, 2026
e18c4b3
fix(registry): scope metaCache key to (registryId, revision) to preve…
XnLemon Jun 4, 2026
bd33338
docs(registry): restore TODO for multi-instance metadata service URL …
XnLemon Jun 4, 2026
5276882
Revert "docs(registry): restore TODO for multi-instance metadata serv…
xianingawa-wq Jun 4, 2026
a117cbd
style(metadata): fix import formatting
xianingawa-wq Jun 4, 2026
36719da
fix(debug) : fix review problems
xianingawa-wq Jun 7, 2026
a18c95c
style(metadata): fix format issue && revert some changes
xianingawa-wq Jun 8, 2026
81160b7
fix(metadata): update tests and comment to match default fallback in …
xianingawa-wq Jun 8, 2026
dbedc14
fix: address review comments on clarify-metadata-report-selection
XnLemon Jun 10, 2026
91b9136
fix: fix test isolation and cache key format after review changes
XnLemon Jun 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(registry): upgrade missing-registryId log from Warn to Error with…
… accurate consequence

The previous Warnf said 'revision will be empty', which is wrong on two
counts: the actual computed revision is "0" (not empty), and revision
"0" causes OnEvent to silently skip the instance entirely, making it
permanently invisible to all consumers.

Upgrade to Errorf and describe the actual outcome so operators can
diagnose misconfigurations immediately. Applies to both exported and
subscribed revision customizers.
  • Loading branch information
XnLemon authored and xianingawa-wq committed Jun 8, 2026
commit 663d4cf35c54630e2fe63877a8542faae505824d
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ func (e *exportedServicesRevisionMetadataCustomizer) GetPriority() int {
func (e *exportedServicesRevisionMetadataCustomizer) Customize(instance registry.ServiceInstance) {
registryId := instance.GetMetadata()[constant.RegistryIdKey]
if len(registryId) == 0 {
logger.Warnf("[Registry][ServiceDiscovery] instance has no registryId in metadata, exported revision will be empty")
// revision will be "0" (no services found for empty key), which causes OnEvent to skip
// this instance entirely — ensure RegistryIdKey is set before customizers run.
logger.Errorf("[Registry][ServiceDiscovery] instance has no registryId in metadata; "+
"exported revision will be \"0\" and this instance will be invisible to consumers")
}
metaInfo := metadata.GetMetadataInfo(registryId)
var urls []*common.URL
Expand All @@ -79,7 +82,10 @@ func (e *subscribedServicesRevisionMetadataCustomizer) GetPriority() int {
func (e *subscribedServicesRevisionMetadataCustomizer) Customize(instance registry.ServiceInstance) {
registryId := instance.GetMetadata()[constant.RegistryIdKey]
if len(registryId) == 0 {
logger.Warnf("[Registry][ServiceDiscovery] instance has no registryId in metadata, subscribed revision will be empty")
// revision will be "0" (no subscriptions found for empty key), which causes OnEvent to skip
// this instance entirely — ensure RegistryIdKey is set before customizers run.
logger.Errorf("[Registry][ServiceDiscovery] instance has no registryId in metadata; "+
"subscribed revision will be \"0\" and this instance will be invisible to consumers")
}
metaInfo := metadata.GetMetadataInfo(registryId)
var urls []*common.URL
Expand Down