Skip to content

Commit

Permalink
compatible with metadata write nacos 3.1.x before
Browse files Browse the repository at this point in the history
  • Loading branch information
FoghostCn committed Jan 16, 2024
1 parent f350766 commit 41bc0d5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions metadata/report/nacos/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,21 @@ func (n *nacosMetadataReport) PublishAppMetadata(metadataIdentifier *identifier.
if err != nil {
return err
}
// same with java impl
return n.storeMetadata(vo.ConfigParam{
// compatible with java impl
err = n.storeMetadata(vo.ConfigParam{
DataId: metadataIdentifier.Application,
Group: metadataIdentifier.Revision,
Content: string(data),
})
if err != nil {
return err
}
// compatible with dubbo-go 3.1.x before
return n.storeMetadata(vo.ConfigParam{
DataId: metadataIdentifier.GetIdentifierKey(),
Group: n.group,
Content: string(data),
})
}

// StoreProviderMetadata stores the metadata.
Expand Down

0 comments on commit 41bc0d5

Please sign in to comment.