You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2017/03/09 19:09:44 UTC
[36/44] incubator-trafficcontrol git commit: add back
simple_retry_codes, it will be in upstream soon
add back simple_retry_codes, it will be in upstream soon
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/658dcc05
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/658dcc05
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/658dcc05
Branch: refs/heads/master
Commit: 658dcc053871776f060dd34b643d315d60e95fb9
Parents: 86252a8
Author: Jan van Doorn <jv...@apache.org>
Authored: Mon Feb 13 16:09:18 2017 +0000
Committer: Jan van Doorn <jv...@apache.org>
Committed: Fri Feb 17 17:49:11 2017 +0000
----------------------------------------------------------------------
.../20170205101432_cdn_table_domain_name.go | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/658dcc05/traffic_ops/app/db/migrations/20170205101432_cdn_table_domain_name.go
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/migrations/20170205101432_cdn_table_domain_name.go b/traffic_ops/app/db/migrations/20170205101432_cdn_table_domain_name.go
index 70cb01c..00bbee6 100644
--- a/traffic_ops/app/db/migrations/20170205101432_cdn_table_domain_name.go
+++ b/traffic_ops/app/db/migrations/20170205101432_cdn_table_domain_name.go
@@ -201,16 +201,15 @@ func Up_20170205101432(txn *sql.Tx) {
}
} else {
// unavailable_server_retry_responses is the only one that survives?
- if string(match[1]) == "dead_server_retry_response_codes" {
- pName := "mso.unavailable_server_retry_responses"
- fmt.Println("INSERT INTO PARAMETER (name, config_file, value) VALUES ($1, $2, $3) RETURNING id",
- pName, "parent.config", string(match[2]))
- newRow := txn.QueryRow("INSERT INTO PARAMETER (name, config_file, value) VALUES ($1, $2, $3) RETURNING id",
- pName, "parent.config", string(match[2]))
- err := newRow.Scan(&newId)
- checkErr(err, txn)
- existingParam[string(match[1])+string(match[2])] = newId
- }
+ // if string(match[1]) == "dead_server_retry_response_codes" {
+ pName := strings.Replace("mso."+string(match[1]), "dead", "unavailable", 1) // "mso.unavailable_server_retry_responses"
+ fmt.Println("INSERT INTO PARAMETER (name, config_file, value) VALUES ($1, $2, $3) RETURNING id",
+ pName, "parent.config", string(match[2]))
+ newRow := txn.QueryRow("INSERT INTO PARAMETER (name, config_file, value) VALUES ($1, $2, $3) RETURNING id",
+ pName, "parent.config", string(match[2]))
+ err := newRow.Scan(&newId)
+ checkErr(err, txn)
+ existingParam[string(match[1])+string(match[2])] = newId
}
} else {
newId = existingParam[string(match[1])+string(match[2])]