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

<fix>[constants]: add StateSyncConnected WatchEvent state #127

Merged
merged 1 commit into from
Apr 20, 2024
Merged

Conversation

jeffbean
Copy link

@jeffbean jeffbean commented Apr 12, 2024

NOTE: WatcherEvent State will change from StateUnknown to StateSyncConnected

jeffbean: rebased authored commit from @KaithyRookie to pickup unit test configuration in github.

StateSyncConnected means client is connected to a server in the ensemble

@jeffbean jeffbean linked an issue Apr 12, 2024 that may be closed by this pull request
@jeffbean jeffbean requested review from echohead and alxn April 12, 2024 22:50
StateSyncConnected means client is connected to a server in the ensemble
@alxn
Copy link

alxn commented Apr 20, 2024

Doesn't this need a call to c.setState somewhere in conn.go ?

@jeffbean
Copy link
Author

In this case, The State is actually used as the Field on watcherEvent. In all other cases in this library, the State is client side only (and can be any value).

Example is StateConnected = State(100) was just picked by samuel and can be anything this library wants. But the bug here is that we share this with the proto value for watcherEvent.

so no in this case its only for the wire response here.

@jeffbean
Copy link
Author

This does raise the problem of this being a breaking change if folks do switch or conditional logic on the State in a watcher event :(. Like the redis bugfix recently

@jeffbean jeffbean added this to the v1.1.0 milestone Apr 20, 2024
@jeffbean jeffbean changed the title <fix>[constants]: add StateSyncConnected event state <fix>[constants]: add StateSyncConnected WatchEvent state Apr 20, 2024
Copy link

@alxn alxn left a comment

Choose a reason for hiding this comment

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

May want to note that this could be a change from StateUnknown

@jeffbean jeffbean merged commit 5527cae into master Apr 20, 2024
14 checks passed
@jeffbean jeffbean deleted the pr/97 branch April 20, 2024 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zk event state not support SyncConnected
3 participants