[
https://issues.apache.org/jira/browse/CLOUDSTACK-9006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14982836#comment-14982836
]
ASF GitHub Bot commented on CLOUDSTACK-9006:
--------------------------------------------
Github user bhaisaab commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1009#discussion_r43523817
--- Diff: framework/db/src/com/cloud/utils/db/Filter.java ---
@@ -89,7 +89,7 @@ public void addOrderBy(Class<?> clazz, String field,
boolean ascending) {
if (_orderBy == null) {
_orderBy = order.insert(0, " ORDER BY ").toString();
} else {
- _orderBy = order.insert(0, _orderBy).toString();
+ _orderBy = order.insert(0, _orderBy + ", ").toString();
--- End diff --
LGTM, but since this is a core change can you write a small unit test for
this method? For the list template api, the temp_zone_pair should give a unique
id (template_id + "_" + zone_id) so sorting on this should give us
deterministic results.
> ListTemplates API returns result in inconsistent order when called
> concurrently
> -------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-9006
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9006
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: API
> Reporter: Ramamurti Subramanian
> Assignee: Ramamurti Subramanian
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)