You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2019/07/05 19:17:59 UTC

[GitHub] [trafficcontrol] rawlinp opened a new issue #3715: Deleting or offlining all Riak servers in TO does not stop the TO-internal riak cluster

rawlinp opened a new issue #3715: Deleting or offlining all Riak servers in TO does not stop the TO-internal riak cluster
URL: https://github.com/apache/trafficcontrol/issues/3715
 
 
   If ONLINE Riak servers have been configured in TO and an API request that uses the Riak servers is made, TO will initialize its internal, shared Riak cluster object. If you then delete all the RIAK servers or set their statuses to something other than ONLINE and make another API request that uses Riak, then TO should gracefully destroy its internal, shared Riak cluster and return a proper response to indicate that there are no ONLINE Riak servers to use. Currently, TO continues to use its existing riak cluster object and will handle the request as if all the initial Riak servers were still ONLINE.
   
   I think the issue is that [this error check](https://github.com/apache/trafficcontrol/blob/61a985ce4aeffcb67764b6e7ad81b922bbf8c90c/traffic_ops/traffic_ops_golang/riaksvc/riak_services.go#L233) does not check for the `sql.ErrNoRows` case (i.e. the query returned no rows, meaning there are no ONLINE riak nodes in TO). If the query returned no rows, the code should check to see if the TO-internal shared Riak cluster is currently running and shut it down properly if it is (set the finalizer for the reference and set the package-scope reference to nil).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services