Skip to content

Conversation

@wuwen5
Copy link
Contributor

@wuwen5 wuwen5 commented Jul 9, 2024

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

Restore some code and fix cache scheduled refresh issue.

Ⅱ. Does this pull request fix one issue?

fixes #6660

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

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

我认为应该将take改为poll,加上超时时间就可以了,不需要独立一个线程去处理这个刷新缓存时间,你觉得呢?
I think we should change "take" to "poll" and add a timeout, that should be enough. We don't need a separate thread to handle the cache refresh time. What do you think about that?

@wuwen5
Copy link
Contributor Author

wuwen5 commented Jul 9, 2024

我认为应该将take改为poll,加上超时时间就可以了,不需要独立一个线程去处理这个刷新缓存时间,你觉得呢? I think we should change "take" to "poll" and add a timeout, that should be enough. We don't need a separate thread to handle the cache refresh time. What do you think about that?

OK, Good idea

@wuwen5
Copy link
Contributor Author

wuwen5 commented Jul 9, 2024

@funky-eyes
已经修改,同时我将currentTimeMillis改为了nanoTime,因为计算时间流逝应该使用单调时间而不是挂钟时间,避免时钟回拨问题.

It has been modified, and at the same time, I have changed the currentTimeMillis to nanoTime because calculating the passage of time should use monotonic time instead of clock time to avoid clock back issues.

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

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

LGTM
麻烦在changelog中找到中英两版语言的2.x.md在其中将该pr登记,并登记你的github信息

@funky-eyes funky-eyes added this to the 2.2.0 milestone Jul 9, 2024
@funky-eyes funky-eyes added type: bug Category issues or prs related to bug. module/rm-datasource rm-datasource module labels Jul 9, 2024
@funky-eyes funky-eyes changed the title Fix cache scheduled refresh issue. bugfix: fix cache scheduled refresh issue. Jul 9, 2024
@funky-eyes funky-eyes added the first-time contributor first-time contributor label Jul 9, 2024
@funky-eyes
Copy link
Contributor

请把你的钉钉联系方式发送至:[email protected] 我将邀请你加入seata开发者群中
Please send me your DingTalk contact information to [email protected]. I will invite you to join the Seata developers group.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 50.77%. Comparing base (933b492) to head (5b965de).
Report is 35 commits behind head on 2.x.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #6661      +/-   ##
============================================
- Coverage     51.13%   50.77%   -0.36%     
- Complexity     5317     5642     +325     
============================================
  Files           950     1023      +73     
  Lines         33448    35440    +1992     
  Branches       4048     4216     +168     
============================================
+ Hits          17103    17995     +892     
- Misses        14666    15644     +978     
- Partials       1679     1801     +122     
Files Coverage Δ
...m/datasource/sql/struct/TableMetaCacheFactory.java 57.89% <33.33%> (+5.26%) ⬆️

... and 107 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first-time contributor first-time contributor module/rm-datasource rm-datasource module type: bug Category issues or prs related to bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

定时刷新TableMeta缓存的功能失效了

3 participants