Skip to content

fix(registry): add millisecond timestamp to instance metadata - #3807

Merged
Alanxtl merged 1 commit into
apache:developfrom
AsperforMias:fix-3804-timestamp-rebase
Nov 13, 2026
Merged

Alanxtl merged 1 commit into
apache:developfrom
AsperforMias:fix-3804-timestamp-rebase

Conversation

@AsperforMias

@AsperforMias AsperforMias commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes #3804

dubbo-go does not write timestamp into the instance metadata, so Dubbo Admin cannot read a register time and shows dubbo-go instances as UnRegistered.

This PR writes timestamp in createInstance, in milliseconds. Admin parses it with time.UnixMilli and Dubbo Java writes milliseconds, so a value in seconds would show up in Admin as a 1970 date. Only this field uses milliseconds; other timestamps in dubbo-go stay in seconds.

Verified end to end with Nacos application-level discovery and Dubbo Admin (develop):

  • develop: no timestamp, registerState is UnRegistered and registerTime is empty.
  • this PR: timestamp=1794496237887, registerState is Registered and registerTime is the current time.

The test checks that the written timestamp is in milliseconds and falls between the times taken before and after registration.

Checklist

  • I confirm the target branch is develop
  • I have run make fmt to format my code
  • I have run make test to run local tests
  • I have added tests that prove my fix is effective or that my feature works

@sonarqubecloud

Copy link
Copy Markdown

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.72%. Comparing base (60d1c2a) to head (6edae75).
⚠️ Report is 1041 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #3807       +/-   ##
============================================
+ Coverage    46.76%   58.72%   +11.95%     
============================================
  Files          295      492      +197     
  Lines        17172    40433    +23261     
============================================
+ Hits          8031    23744    +15713     
- Misses        8287    14910     +6623     
- Partials       854     1779      +925     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Alanxtl Alanxtl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Alanxtl
Alanxtl merged commit 3fc5d5e into apache:develop Nov 13, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.3.3 version 3.3.3 ☢️ Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 实例元数据缺少 timestamp,Admin 中 dubbo-go 实例显示为 UnRegistered

3 participants