rob05c edited a comment on issue #4935:
URL: https://github.com/apache/trafficcontrol/issues/4935#issuecomment-669546358
>So hostnames don't need to be unique?
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 (ID 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.
Maybe with a comment, to fix it when the endpoint is fixed to be host+port?
----------------------------------------------------------------
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]