Skip to content

Commit

Permalink
Merge pull request apache#704 from Howie66/master
Browse files Browse the repository at this point in the history
Imp: Correct words and format codes
  • Loading branch information
fangyincheng authored Aug 9, 2020
2 parents abcc4df + ecdf8cc commit aaa8be3
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Both extension module and layered project architecture is according to Apache Du

![dubbo go extend](./doc/pic/arch/dubbo-go-ext.png)

If you wanna know more about dubbo-go, please visit this reference [Project Architeture design](https://github.com/apache/dubbo-go/wiki/dubbo-go-V1.0-design)
If you wanna know more about dubbo-go, please visit this reference [Project Architecture design](https://github.com/apache/dubbo-go/wiki/dubbo-go-V1.0-design)

## Feature list ##

Expand Down
2 changes: 1 addition & 1 deletion cluster/loadbalance/consistent_hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const (
ConsistentHash = "consistenthash"
// HashNodes ...
HashNodes = "hash.nodes"
// HashArguments key of hash arguments in url
// HashArguments key of hash arguments in url
HashArguments = "hash.arguments"
)

Expand Down
4 changes: 2 additions & 2 deletions cluster/router/condition/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func matchCondition(pairs map[string]MatchPair, url *common.URL, param *common.U
return result
}

// MatchPair Match key pair , condition process
// MatchPair Match key pair, condition process
type MatchPair struct {
Matches *gxset.HashSet
Mismatches *gxset.HashSet
Expand All @@ -314,7 +314,7 @@ func (pair MatchPair) isMatch(value string, param *common.URL) bool {
return true
}
if !pair.Mismatches.Empty() && !pair.Matches.Empty() {
//when both mismatches and matches contain the same value, then using mismatches first
// when both mismatches and matches contain the same value, then using mismatches first
for mismatch := range pair.Mismatches.Items {
if isMatchGlobalPattern(mismatch.(string), value, param) {
return false
Expand Down
10 changes: 5 additions & 5 deletions cluster/router/healthcheck/default_health_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type DefaultHealthChecker struct {
// and the current active request
func (c *DefaultHealthChecker) IsHealthy(invoker protocol.Invoker) bool {
urlStatus := protocol.GetURLStatus(invoker.GetUrl())
if c.isCircuitBreakerTripped(urlStatus) || urlStatus.GetActive() > c.GetOutStandingRequestConutLimit() {
if c.isCircuitBreakerTripped(urlStatus) || urlStatus.GetActive() > c.GetOutStandingRequestCountLimit() {
logger.Debugf("Invoker [%s] is currently in circuitbreaker tripped state", invoker.GetUrl().Key())
return false
}
Expand Down Expand Up @@ -92,18 +92,18 @@ func (c *DefaultHealthChecker) getCircuitBreakerSleepWindowTime(status *protocol
return int64(sleepWindow)
}

// GetOutStandingRequestConutLimit return the requestSuccessiveFailureThreshold bound to this DefaultHealthChecker
// GetRequestSuccessiveFailureThreshold return the requestSuccessiveFailureThreshold bound to this DefaultHealthChecker
func (c *DefaultHealthChecker) GetRequestSuccessiveFailureThreshold() int32 {
return c.requestSuccessiveFailureThreshold
}

// GetOutStandingRequestConutLimit return the circuitTrippedTimeoutFactor bound to this DefaultHealthChecker
// GetCircuitTrippedTimeoutFactor return the circuitTrippedTimeoutFactor bound to this DefaultHealthChecker
func (c *DefaultHealthChecker) GetCircuitTrippedTimeoutFactor() int32 {
return c.circuitTrippedTimeoutFactor
}

// GetOutStandingRequestConutLimit return the outStandingRequestConutLimit bound to this DefaultHealthChecker
func (c *DefaultHealthChecker) GetOutStandingRequestConutLimit() int32 {
// GetOutStandingRequestCountLimit return the outStandingRequestConutLimit bound to this DefaultHealthChecker
func (c *DefaultHealthChecker) GetOutStandingRequestCountLimit() int32 {
return c.outStandingRequestConutLimit
}

Expand Down
2 changes: 1 addition & 1 deletion filter/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
// Filter interface defines the functions of a filter
// Extension - Filter
type Filter interface {
// Invoke is the core function of a filter, it determins the process of the filter
// Invoke is the core function of a filter, it determines the process of the filter
Invoke(context.Context, protocol.Invoker, protocol.Invocation) protocol.Result
// OnResponse updates the results from Invoke and then returns the modified results.
OnResponse(context.Context, protocol.Result, protocol.Invoker, protocol.Invocation) protocol.Result
Expand Down
2 changes: 1 addition & 1 deletion protocol/dubbo/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ type Response struct {
atta map[string]string
}

// NewResponse create a new Response.
// nolint
func NewResponse(reply interface{}, atta map[string]string) *Response {
return &Response{
reply: reply,
Expand Down
2 changes: 1 addition & 1 deletion protocol/dubbo/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (p *DubboPackage) Marshal() (*bytes.Buffer, error) {
return bytes.NewBuffer(pkg), nil
}

// Unmarshal dncode hessian package.
// Unmarshal decodes hessian package.
func (p *DubboPackage) Unmarshal(buf *bytes.Buffer, opts ...interface{}) error {
// fix issue https://github.com/apache/dubbo-go/issues/380
bufLen := buf.Len()
Expand Down
2 changes: 1 addition & 1 deletion protocol/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (s *Server) Start(url common.URL) {
panic(err)
}

// if global trace instance was set , then server tracer instance can be get. If not , will return Nooptracer
// if global trace instance was set, then server tracer instance can be get. If not , will return Nooptracer
tracer := opentracing.GlobalTracer()
server := grpc.NewServer(
grpc.UnaryInterceptor(otgrpc.OpenTracingServerInterceptor(tracer)))
Expand Down
4 changes: 2 additions & 2 deletions protocol/invocation/rpcinvocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

// ///////////////////////////
// Invocation Impletment of RPC
// Invocation Implement of RPC
// ///////////////////////////

// todo: is it necessary to separate fields of consumer(provider) from RPCInvocation
Expand Down Expand Up @@ -103,7 +103,7 @@ func (r *RPCInvocation) Attachments() map[string]string {
return r.attachments
}

// AttachmentsByKey gets RPC attachment by key , if nil then return default value.
// AttachmentsByKey gets RPC attachment by key, if nil then return default value.
func (r *RPCInvocation) AttachmentsByKey(key string, defaultValue string) string {
r.lock.RLock()
defer r.lock.RUnlock()
Expand Down
2 changes: 1 addition & 1 deletion protocol/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type Result interface {
}

/////////////////////////////
// Result Impletment of RPC
// Result Implement of RPC
/////////////////////////////

// RPCResult is default RPC result.
Expand Down
2 changes: 1 addition & 1 deletion registry/etcdv3/service_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (e *etcdV3ServiceDiscovery) String() string {
return e.descriptor
}

// Destory service discovery
// Destroy service discovery
func (e *etcdV3ServiceDiscovery) Destroy() error {
if e.client != nil {
e.client.Close()
Expand Down
6 changes: 3 additions & 3 deletions registry/nacos/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ func (nl *nacosListener) Callback(services []model.SubscribeService, err error)
instance := generateInstance(services[i])
newInstanceMap[host] = instance
if old, ok := nl.instanceMap[host]; !ok {
//instance is not exsit in cache,add it to cache
// instance is not exist in cache, add it to cache
addInstances = append(addInstances, instance)
} else {
//instance is not different from cache,update it to cache
// instance is not different from cache, update it to cache
if !reflect.DeepEqual(old, instance) {
updateInstances = append(updateInstances, instance)
}
Expand All @@ -144,7 +144,7 @@ func (nl *nacosListener) Callback(services []model.SubscribeService, err error)

for host, inst := range nl.instanceMap {
if _, ok := newInstanceMap[host]; !ok {
//cache instance is not exsit in new instance list, remove it from cache
// cache instance is not exist in new instance list, remove it from cache
delInstances = append(delInstances, inst)
}
}
Expand Down
2 changes: 1 addition & 1 deletion registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type Registry interface {
//Deprecated!
//subscribe(event.URL) (Listener, error)

//Will relace mode1 in dubbogo version v1.1.0
//Will replace mode1 in dubbogo version v1.1.0
//mode2 : callback mode, subscribe with notify(notify listener).
Subscribe(*common.URL, NotifyListener) error

Expand Down
2 changes: 1 addition & 1 deletion remoting/etcdv3/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
)

const (
// ConnDelay connection dalay
// ConnDelay connection delay
ConnDelay = 3
// MaxFailTimes max failure times
MaxFailTimes = 15
Expand Down
2 changes: 1 addition & 1 deletion remoting/kubernetes/registry_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ func (c *dubboRegistryController) addAnnotationForCurrentPod(k string, v string)
c.lock.Lock()
defer c.lock.Unlock()

// 1. accord old pod && (k, v) assemble new pod dubbo annotion v
// 1. accord old pod && (k, v) assemble new pod dubbo annotation v
// 2. get patch data
// 3. PATCH the pod
currentPod, err := c.readCurrentPod()
Expand Down
2 changes: 1 addition & 1 deletion remoting/zookeeper/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func NewZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (*
return z, nil
}

// WithTestCluster sets test cluser for zk client
// WithTestCluster sets test cluster for zk client
func WithTestCluster(ts *zk.TestCluster) Option {
return func(opt *Options) {
opt.ts = ts
Expand Down

0 comments on commit aaa8be3

Please sign in to comment.