You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2018/07/17 22:37:08 UTC

[trafficcontrol] branch master updated: properly issue delete query in transaction

This is an automated email from the ASF dual-hosted git repository.

dangogh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new aff5fbc  properly issue delete query in transaction
aff5fbc is described below

commit aff5fbcb3a46f8433dedf64140a878a069a2a433
Author: Dylan Volz <Dy...@comcast.com>
AuthorDate: Tue Jul 17 14:58:48 2018 -0600

    properly issue delete query in transaction
---
 traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go b/traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go
index 0c4cbec..748ceae 100644
--- a/traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go
+++ b/traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go
@@ -368,7 +368,7 @@ func GetReplaceHandler(db *sqlx.DB) http.HandlerFunc {
 
 		if *payload.Replace {
 			// delete existing
-			rows, err := db.Queryx("DELETE FROM deliveryservice_server WHERE deliveryservice = $1", *dsId)
+			rows, err := tx.Queryx("DELETE FROM deliveryservice_server WHERE deliveryservice = $1", *dsId)
 			if err != nil {
 				log.Errorf("unable to remove the existing servers assigned to the delivery service: %s", err)
 				handleErrs(http.StatusInternalServerError, err)