"go1.6, !go1.8" constraints are interpreted as (version >= 1.6 AND ) OR version < 1.8, where (version >= 1.6 AND ) is always false,
so it matches all go versions before 1.8, not only 1.6 and 1.7.
Removed a space, so the constraints are now matches only go1.6 and go1.7 versions
Split round_robin balancer into a base balancer (which manages SubConn and connectivity states), and a round_robin picker.
A custom picker with other picking algorithms can be provided to build custom balancers.
* protoCodec: return early if proto.Marshaler
If the object to marshal implements proto.Marshaler, delegate to that
immediately instead of pre-allocating a buffer. (*proto.Buffer).Marshal
has the same logic, so the []byte buffer we pre-allocate in codec.go
would never be used.
This is mainly for users of gogoproto. If you turn on the "marshaler"
and "sizer" gogoproto options, the generated Marshal() method already
pre-allocates a buffer of the appropriate size for marshaling the
entire object.
* protoCodec: return early if proto.Unmarshaler
If the object to unmarshal implements proto.Unmarshaler, delegate to
that immediately. This perhaps saves a bit of work preparing the
cached the proto.Buffer object which would not end up being used for
the proto.Unmarshaler case.
Note that I moved the obj.Reset() call above the delegation to
obj.Unmarshal(). This maintains the grpc behavior of
proto.Unmarshalers always being Reset() before being delegated to,
which is consistent to how proto.Unmarshal() behaves (proto.Buffer
does not call Reset() in Unmarshal).
WriteStatus can be called concurrently: one by SendMsg,
the other by RecvMsg. Then, closing writes channel
becomes racey without proper locking.
Make transport closing synchronous in such case.
This allows ClientConn to get more up-to-date addresses from resolver.
ClientConn compares new addresses with the cached ones. So if resolver returns the same set of addresses, ClientConn will not notify balancer about it.
Also moved the initialization of resolver and balancer to avoid race. Balancer will only be started when ClientConn gets resolved addresses from balancer.
- Define env variable RUN386 and set GOARCH later, instead of assigning to GOARCH directly. Otherwise, gimme will override GOARCH back
- Add misspell check
- Disable -race on 386