You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ne...@apache.org on 2017/01/25 17:30:20 UTC
[09/20] incubator-trafficcontrol git commit: Remove TM2 wrong comments
Remove TM2 wrong comments
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/f3e45f79
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/f3e45f79
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/f3e45f79
Branch: refs/heads/master
Commit: f3e45f79c1831f6004d56b427e0c4ca160b06356
Parents: f31ffc7
Author: Robert Butts <ro...@gmail.com>
Authored: Mon Jan 23 11:02:38 2017 -0700
Committer: Dave Neuman <ne...@apache.org>
Committed: Wed Jan 25 10:29:46 2017 -0700
----------------------------------------------------------------------
.../experimental/traffic_monitor/manager/datarequest.go | 4 ++--
.../experimental/traffic_monitor/manager/manager.go | 3 +--
.../traffic_monitor/trafficopsdata/trafficopsdata.go | 6 ++----
3 files changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/f3e45f79/traffic_monitor/experimental/traffic_monitor/manager/datarequest.go
----------------------------------------------------------------------
diff --git a/traffic_monitor/experimental/traffic_monitor/manager/datarequest.go b/traffic_monitor/experimental/traffic_monitor/manager/datarequest.go
index 2dffb41..47853b7 100644
--- a/traffic_monitor/experimental/traffic_monitor/manager/datarequest.go
+++ b/traffic_monitor/experimental/traffic_monitor/manager/datarequest.go
@@ -584,7 +584,6 @@ func srvTRStateSelf(localStates peer.CRStatesThreadsafe) ([]byte, error) {
return peer.CrstatesMarshall(localStates.Get())
}
-// TODO remove error params, handle by returning an error? How, since we need to return a non-standard code?
func srvCacheStats(params url.Values, errorCount threadsafe.Uint, path string, toData todata.TODataThreadsafe, statResultHistory threadsafe.ResultStatHistory, statInfoHistory threadsafe.ResultInfoHistory, monitorConfig TrafficMonitorConfigMapThreadsafe, combinedStates peer.CRStatesThreadsafe, statMaxKbpses threadsafe.CacheKbpses) ([]byte, int) {
filter, err := NewCacheStatFilter(path, params, toData.Get().ServerTypes)
if err != nil {
@@ -1200,7 +1199,8 @@ func createStatSummary(statResultHistory cache.ResultStatHistory, filter cache.F
for _, val := range statHistory {
fVal, ok := enum.ToNumeric(val.Val)
if !ok {
- continue // skip non-numeric stats. TODO warn about stat history containing different types?
+ log.Warnf("threshold stat %v value %v is not a number, cannot use.", statName, val.Val)
+ continue
}
for i := uint64(0); i < val.Span; i++ {
ssStat.DataPointCount++
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/f3e45f79/traffic_monitor/experimental/traffic_monitor/manager/manager.go
----------------------------------------------------------------------
diff --git a/traffic_monitor/experimental/traffic_monitor/manager/manager.go b/traffic_monitor/experimental/traffic_monitor/manager/manager.go
index b5e3d49..79c69af 100644
--- a/traffic_monitor/experimental/traffic_monitor/manager/manager.go
+++ b/traffic_monitor/experimental/traffic_monitor/manager/manager.go
@@ -60,7 +60,6 @@ func Start(opsConfigFile string, cfg config.Config, staticAppData StaticAppData)
Pending: gmx.NewGauge("fetchPending"),
}
- // TODO investigate whether a unique client per cache to be polled is faster
sharedClient := &http.Client{
Transport: &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: true}},
Timeout: cfg.HTTPTimeout,
@@ -76,7 +75,7 @@ func Start(opsConfigFile string, cfg config.Config, staticAppData StaticAppData)
cacheHealthHandler := cache.NewHandler()
cacheHealthPoller := poller.NewHTTP(cfg.CacheHealthPollingInterval, true, sharedClient, counters, cacheHealthHandler, cfg.HTTPPollNoSleep)
- cacheStatHandler := cache.NewPrecomputeHandler(toData, peerStates) // TODO figure out if this is necessary, with the CacheHealthPoller
+ cacheStatHandler := cache.NewPrecomputeHandler(toData, peerStates)
cacheStatPoller := poller.NewHTTP(cfg.CacheStatPollingInterval, false, sharedClient, counters, cacheStatHandler, cfg.HTTPPollNoSleep)
monitorConfigPoller := poller.NewMonitorConfig(cfg.MonitorConfigPollingInterval)
peerHandler := peer.NewHandler()
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/f3e45f79/traffic_monitor/experimental/traffic_monitor/trafficopsdata/trafficopsdata.go
----------------------------------------------------------------------
diff --git a/traffic_monitor/experimental/traffic_monitor/trafficopsdata/trafficopsdata.go b/traffic_monitor/experimental/traffic_monitor/trafficopsdata/trafficopsdata.go
index e12818c..cefb441 100644
--- a/traffic_monitor/experimental/traffic_monitor/trafficopsdata/trafficopsdata.go
+++ b/traffic_monitor/experimental/traffic_monitor/trafficopsdata/trafficopsdata.go
@@ -8,9 +8,9 @@ package trafficopsdata
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -19,7 +19,6 @@ package trafficopsdata
* under the License.
*/
-
import (
"encoding/json"
"fmt"
@@ -134,7 +133,6 @@ type CRConfig struct {
// Fetch gets the CRConfig from Traffic Ops, creates the TOData maps, and atomically sets the TOData.
// TODO since the session is threadsafe, each TOData get func below could be put in a goroutine, if performance mattered
-// TODO change called funcs to take CRConfigRaw instead of toSession
func (d TODataThreadsafe) Fetch(to towrap.ITrafficOpsSession, cdn string) error {
newTOData := TOData{}