rvalle commented on issue #3934: URL: https://github.com/apache/cloudstack/issues/3934#issuecomment-699922153
@resmo @rhtyd The result that @resmo expect, or ansible modules expect, would require zones to be sorted by the expression (sortkey,id), as you know when sortkey has the same value, id is used... etc. So I have been looking at the code to check what the actual implemented order criteria is: looks to me like the method is here: https://github.com/apache/cloudstack/blob/82b6971258a2f63360dbd0cb404fcf87669a5327/server/src/main/java/com/cloud/api/query/QueryManagerImpl.java#L3053 But this method seems to rely on an utility: https://github.com/apache/cloudstack/blob/82b6971258a2f63360dbd0cb404fcf87669a5327/server/src/main/java/com/cloud/api/query/QueryManagerImpl.java#L3075 Which seems to take a single field as order to build the underlying SQL. This utility would need to be restructured so to allow more than one field to be specified as order key. On the other hand @resmo, are you sure this has ever worked? I mean that cloudstack has returned zones in a deterministic order in the past? It is common for databases not to assure any row order when no order clause is specified but still to return the rows in the order they were created... ---------------------------------------------------------------- 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]
