rob05c commented on issue #4935:
URL: https://github.com/apache/trafficcontrol/issues/4935#issuecomment-669546358


   Ugh. No, the current DB constraint is `{hostname, profile}`. IMO it should 
be `{hostname, port}`, but that's a different discussion.
   We have a ton of endpoints based on host, that only mostly work if you have 
multiple hosts. This is one of them. The "right" solution is to include the 
port/profile in the query, but the endpoint doesn't have that info.
   
   We really need to rework all the hostname endpoints in the API (IDs doesn't 
help, because things like ORT only know their hostname in the first place).
   
   But for now, IMO the best short-term answer is to just assume this host is 
unique, and make the query `fetch first 1 rows only`. And if it's not, and they 
differ, an arbitrary value succeeds. Just like every other endpoint like this.


----------------------------------------------------------------
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:
[email protected]


Reply via email to