Skip to content

Conversation

@carl-mastrangelo
Copy link
Contributor

In relative order of importance:

  • Don't acquire lock when picking subchannel.
  • Use O(1) lookup for updating channel state
  • Use non synchronized ref instead of AtomicReference
  • Dont store size in picker.
  • make class final
  • remove test that was not valid

Copy link
Contributor

@zhangkun83 zhangkun83 left a comment

Choose a reason for hiding this comment

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

Mostly LGTM, except for a small comment.

@VisibleForTesting
static final Attributes.Key<Ref<ConnectivityStateInfo>> STATE_INFO =
Attributes.Key.of("state-info");
private static final Attributes.Key<Ref<EquivalentAddressGroup>> ADDRESS_GROUP =
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need this, because Subchannel.getAddresses() is exactly what you need.

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

In relative order of importance:

* Don't acquire lock when picking subchannel.
* Use O(1) lookup for updating channel state
* Use non synchronized ref instead of AtomicReference
* Dont store size in picker.
* make class final
* remove test that was not valid
@carl-mastrangelo carl-mastrangelo merged commit 8187f1e into grpc:master Oct 17, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
@carl-mastrangelo carl-mastrangelo restored the rr branch August 17, 2019 01:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants