Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Commit

Permalink
Merge 3a432e3 into 79c1855
Browse files Browse the repository at this point in the history
  • Loading branch information
venkat1109 committed Feb 1, 2017
2 parents 79c1855 + 3a432e3 commit f024af8
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 302 deletions.
4 changes: 3 additions & 1 deletion common/metadata/metaMetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ func (m *metadataMetricsMgr) ReadDestination(ctx thrift.Context, request *m.Read
result, err = m.meta.ReadDestination(ctx, request)

if err != nil {
m.m3.IncCounter(metrics.MetadataReadDestinationScope, metrics.MetadataFailures)
if _, ok := err.(*shared.EntityNotExistsError); !ok {
m.m3.IncCounter(metrics.MetadataReadDestinationScope, metrics.MetadataFailures)
}
}

return result, err
Expand Down
12 changes: 6 additions & 6 deletions services/controllerhost/controllerhost.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import (
"github.com/uber/cherami-server/common"
"github.com/uber/cherami-server/common/configure"
"github.com/uber/cherami-server/common/dconfig"
"github.com/uber/cherami-server/common/metadata"
"github.com/uber/cherami-server/common/metrics"
"github.com/uber/cherami-server/services/controllerhost/load"
a "github.com/uber/cherami-thrift/.generated/go/admin"
Expand Down Expand Up @@ -101,7 +102,7 @@ type (
Context struct {
hostID string
localZone string
mm common.MetadataMgr
mm MetadataMgr
rpm common.RingpopMonitor
failureDetector Dfdd
log bark.Logger
Expand Down Expand Up @@ -149,10 +150,8 @@ var _ c.TChanController = (*Mcp)(nil)
func NewController(cfg configure.CommonAppConfig, sVice *common.Service, metadataClient m.TChanMetadataService) (*Mcp, []thrift.TChanServer) {
hostID := uuid.New()

instance := &Mcp{
Service: sVice,
mClient: metadataClient,
}
instance := new(Mcp)
instance.Service = sVice

// Get the deployment name for logger field
deploymentName := sVice.GetConfig().GetDeploymentName()
Expand All @@ -173,7 +172,8 @@ func NewController(cfg configure.CommonAppConfig, sVice *common.Service, metadat

context.dstLock = lockMgr
context.m3Client = metrics.NewClient(instance.Service.GetMetricsReporter(), metrics.Controller)
context.mm = common.NewMetadataMgr(metadataClient, context.m3Client, context.log)
instance.mClient = metadata.NewMetadataMetricsMgr(metadataClient, context.m3Client, context.log)
context.mm = NewMetadataMgr(instance.mClient, context.m3Client, context.log)
context.extentSeals.inProgress = common.NewShardedConcurrentMap(1024, common.UUIDHashCode)
context.extentSeals.failed = common.NewShardedConcurrentMap(1024, common.UUIDHashCode)
context.extentSeals.tokenBucket = common.NewTokenBucket(maxExtentSealsPerSecond, common.NewRealTimeSource())
Expand Down
Loading

0 comments on commit f024af8

Please sign in to comment.