Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Master】【Bug】Fix a bug, When the worker service offline, workerNodeInfo cache in master cannot delete the offline worker #15459

Merged
merged 9 commits into from
Jan 25, 2024

Conversation

alei1206
Copy link
Contributor

Purpose of the pull request

Fix #15370
When the worker service goes offline, delete the worker information from the workerNodeInfo cache in master

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

@SbloodyS SbloodyS added bug Something isn't working 3.2.1 labels Jan 11, 2024
@SbloodyS SbloodyS added this to the 3.2.1 milestone Jan 11, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (feb3023) 38.02% compared to head (67c8d0e) 38.10%.

❗ Current head 67c8d0e differs from pull request most recent head 38de349. Consider uploading reports for the commit 38de349 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##                dev   #15459      +/-   ##
============================================
+ Coverage     38.02%   38.10%   +0.08%     
- Complexity     4693     4698       +5     
============================================
  Files          1304     1304              
  Lines         44812    44818       +6     
  Branches       4804     4804              
============================================
+ Hits          17040    17079      +39     
+ Misses        25921    25885      -36     
- Partials       1851     1854       +3     

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

Co-authored-by: xiangzihao <zihaoxiang@apache.org>
@alei1206
Copy link
Contributor Author

@SbloodyS Hi,Do you think there are any other problem with this PR

@SbloodyS
Copy link
Member

Could you add some UT for it? @alei1206

@alei1206
Copy link
Contributor Author

Could you add some UT for it? @alei1206

@SbloodyS Hi, Unit tests have been added.

@alei1206 alei1206 requested a review from SbloodyS January 21, 2024 09:08
@alei1206
Copy link
Contributor Author

Could you add some UT for it? @alei1206

@SbloodyS Hi, Unit tests have been added.

@SbloodyS Hi, do you have other suggestions about this code?

@rickchengx
Copy link
Contributor

HI, @alei1206 please Run 'mvn spotless:apply' to fix the code style

@alei1206
Copy link
Contributor Author

HI, @alei1206 please Run 'mvn spotless:apply' to fix the code style

@rickchengx Hi,I have modified the code style using mvn spotless:apply. Please check again.

Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

2 New issues
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@rickchengx rickchengx merged commit 4314147 into apache:dev Jan 25, 2024
56 checks passed
@ruanwenjun
Copy link
Member

Does anyone see the todo here? Why only handle the delete event, in fact this is not a bug, the task dispatch failed it will retry until the master refresh worker node, in this PR only handle the delete event, but still miss add event is not a good pr.

@alei1206
Copy link
Contributor Author

Does anyone see the todo here? Why only handle the delete event, in fact this is not a bug, the task dispatch failed it will retry until the master refresh worker node, in this PR only handle the delete event, but still miss add event is not a good pr.

@ruanwenjun Hi, I think, when master refresh worker node, only add new worker server to cache, but not delete the offline worker。 if we not handle the delete event, the offline worker server are always in the cache. Additionally, updateWorkerNodes() will get all the worker nodes in zk and add them to the cache, so I think, we shouldn't need to handle the add event.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants