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

[bug]disk failover datasource not keep status #12207

Closed
shalk opened this issue Jun 12, 2024 · 4 comments · Fixed by #12188
Closed

[bug]disk failover datasource not keep status #12207

shalk opened this issue Jun 12, 2024 · 4 comments · Fixed by #12188
Labels
kind/discussion Category issues related to discussion

Comments

@shalk
Copy link
Contributor

shalk commented Jun 12, 2024

Describe the bug
I try to use client discovery feature "failover on disk ", when create failover switch file 00-VIP-SWICH-....

The client log print failover-mode is on, a few second later, log print failover switch changed, new: off

Because in DiskFailoverDataSource, switch file is not change, so lastModifiedMillis == modified and return new FailoverSwitch(Boolean.FALSE);

I think this is bug in early pr, i will fix it.

Expected behavior
expect failover switch is alway on

Actually behavior
failover switch is off at last

How to Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See errors

Desktop (please complete the following information):

  • OS: [e.g. Centos]
  • Version [e.g. nacos-server 1.3.1, nacos-client 1.3.1]
  • Module [e.g. naming/config]
  • SDK [e.g. original, spring-cloud-alibaba-nacos, dubbo]

Additional context
Add any other context about the problem here.

@KomachiSion
Copy link
Collaborator

so should we change the judgement but not add an status to keep this way?

@KomachiSion KomachiSion added the kind/discussion Category issues related to discussion label Jun 17, 2024
@shalk
Copy link
Contributor Author

shalk commented Jun 17, 2024

so should we change the judgement but not add an status to keep this way?

when lastModifiedMillis == modified , we do not know what is lastSwitch ?

what is your opinion ?

@shalk shalk changed the title disk failover datasource not keep status [bug]disk failover datasource not keep status Jun 20, 2024
@KomachiSion
Copy link
Collaborator

so should we change the judgement but not add an status to keep this way?

when lastModifiedMillis == modified , we do not know what is lastSwitch ?

what is your opinion ?

OK, I know what's your mean, I think your change is a way to fix this problem. Or we reuse the switchParams.

If switchParams contain key FAILOVER_MODE_PARAM, we use the values, else return false. Is it ok?

@shalk
Copy link
Contributor Author

shalk commented Jun 26, 2024

Yes , switchParams can be reuse. pr have been updated

KomachiSion pushed a commit that referenced this issue Jun 26, 2024
* fix disk failover datasource not keep status

* fix style

* fix DiskFailoverDataSource
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/discussion Category issues related to discussion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants