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

Add and use connectivity package for states #1430

Merged
merged 2 commits into from
Aug 9, 2017

Conversation

menghanl
Copy link
Contributor

@menghanl menghanl commented Aug 8, 2017

No description provided.

@dfawley dfawley added the Type: API Change Breaking API changes (experimental APIs only!) label Aug 8, 2017
@dfawley
Copy link
Member

dfawley commented Aug 8, 2017

@dzbarsky FYI, we will be changing the connectivity API slightly in this PR (to support upcoming work revamping the resolver and balancer logic), in case you are using it already.

@@ -587,9 +554,9 @@ type ClientConn struct {
mkp keepalive.ClientParameters
}

// WaitForStateChange waits until the ConnectivityState of ClientConn changes from sourceState or
// WaitForStateChange waits until the connectivity.State of ClientConn changes from sourceState or
// ctx expires. A true value is returned in former case and false in latter.
Copy link
Member

Choose a reason for hiding this comment

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

Yeesh, we didn't write the "experimental" disclaimer here. Can you add it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -602,8 +569,8 @@ func (cc *ClientConn) WaitForStateChange(ctx context.Context, sourceState Connec
}
}

// GetState returns the ConnectivityState of ClientConn.
func (cc *ClientConn) GetState() ConnectivityState {
// GetState returns the connectivity.State of ClientConn.
Copy link
Member

Choose a reason for hiding this comment

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

Same.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@dzbarsky
Copy link
Contributor

dzbarsky commented Aug 8, 2017

@dfawley thanks for the warning, we're already using this since we were blocked on it for a while. It looks like this just moved it to a separate package so that shouldn't be a problem for us. Please let us know if there are any actual breaking changes, thanks!

@menghanl menghanl merged commit e81b569 into grpc:master Aug 9, 2017
@menghanl menghanl deleted the add_connectivitys_package branch August 9, 2017 17:31
menghanl added a commit to menghanl/grpc-go that referenced this pull request Aug 10, 2017
Add and use connectivity package for states (grpc#1430)

* Add and use connectivity package
* Mark cc state APIs as experimental

Add balancer, resolver and connectivity package.

add balancer_v1_wrapper.go and remove grpclb.go

all test passed, how?

end2end passed, nil pointer failure, ac.wait return nil transport

fix ac.wait return nil transport, races not fixed (accessing cc.balancer)

end2end passed, TODO grpclb

all test passed

add grpclb back

move building balancer out from a goroutine to avoid race

Otherwise, Dial() and Close() may race.

Mark new APIs experimental

split resetAddrConn into newAddrConn and connect

add acBalancerWrapper

rename file to balancer_conn_wrappers.go

remove grpclog.Print

make TODO(bar)

remove Print

comments fixes

add missing license

fix build failure after merge

fix race in grpclb
menghanl added a commit to menghanl/grpc-go that referenced this pull request Aug 10, 2017
Add and use connectivity package for states (grpc#1430)

* Add and use connectivity package
* Mark cc state APIs as experimental

Add balancer, resolver and connectivity package.

add balancer_v1_wrapper.go and remove grpclb.go

all test passed, how?

end2end passed, nil pointer failure, ac.wait return nil transport

fix ac.wait return nil transport, races not fixed (accessing cc.balancer)

end2end passed, TODO grpclb

all test passed

add grpclb back

move building balancer out from a goroutine to avoid race

Otherwise, Dial() and Close() may race.

Mark new APIs experimental

split resetAddrConn into newAddrConn and connect

add acBalancerWrapper

rename file to balancer_conn_wrappers.go

remove grpclog.Print

make TODO(bar)

remove Print

comments fixes

add missing license

fix build failure after merge

fix race in grpclb
menghanl added a commit that referenced this pull request Aug 14, 2017
* Add and use connectivity package
* Mark cc state APIs as experimental
menghanl added a commit to menghanl/grpc-go that referenced this pull request Aug 16, 2017
Add and use connectivity package for states (grpc#1430)

* Add and use connectivity package
* Mark cc state APIs as experimental

Add balancer, resolver and connectivity package.

add balancer_v1_wrapper.go and remove grpclb.go

all test passed, how?

end2end passed, nil pointer failure, ac.wait return nil transport

fix ac.wait return nil transport, races not fixed (accessing cc.balancer)

end2end passed, TODO grpclb

all test passed

add grpclb back

move building balancer out from a goroutine to avoid race

Otherwise, Dial() and Close() may race.

Mark new APIs experimental

split resetAddrConn into newAddrConn and connect

add acBalancerWrapper

rename file to balancer_conn_wrappers.go

remove grpclog.Print

make TODO(bar)

remove Print

comments fixes

add missing license

fix build failure after merge

fix race in grpclb
@menghanl menghanl added the 1.6 label Aug 24, 2017
@dfawley dfawley modified the milestone: 1.6 Release Aug 28, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: API Change Breaking API changes (experimental APIs only!)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants