diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-11-30 09:42:06 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-11-30 09:42:06 +0100 |
commit | 1b0505a3bc6aa012a3af41e5faafe2fc2cfe265a (patch) | |
tree | 7bceeb2a035b1c0cd3ef48402d1155d8cfad0111 /sonar-db | |
parent | bac57da65f5a8ab30cf44d9bfaf9c92df75f3538 (diff) | |
download | sonarqube-1b0505a3bc6aa012a3af41e5faafe2fc2cfe265a.tar.gz sonarqube-1b0505a3bc6aa012a3af41e5faafe2fc2cfe265a.zip |
Always select queue rows in the same order
Diffstat (limited to 'sonar-db')
-rw-r--r-- | sonar-db/src/main/resources/org/sonar/db/ce/CeQueueMapper.xml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sonar-db/src/main/resources/org/sonar/db/ce/CeQueueMapper.xml b/sonar-db/src/main/resources/org/sonar/db/ce/CeQueueMapper.xml index 42b26d303c9..f43a9e9b30c 100644 --- a/sonar-db/src/main/resources/org/sonar/db/ce/CeQueueMapper.xml +++ b/sonar-db/src/main/resources/org/sonar/db/ce/CeQueueMapper.xml @@ -14,6 +14,10 @@ cq.updated_at as updatedAt </sql> + <sql id="orderByDateAndId"> + order by cq.created_at asc, cq.id asc + </sql> + <select id="selectByUuid" parameterType="String" resultType="org.sonar.db.ce.CeQueueDto"> select <include refid="columns"/> @@ -34,14 +38,14 @@ <include refid="columns"/> from ce_queue cq where cq.component_uuid=#{componentUuid} - order by cq.id asc + <include refid="orderByDateAndId"/> </select> <select id="selectAllInAscOrder" resultType="org.sonar.db.ce.CeQueueDto"> select <include refid="columns"/> from ce_queue cq - order by cq.id asc + <include refid="orderByDateAndId"/> </select> <select id="selectEligibleForPeek" resultType="String"> @@ -53,7 +57,7 @@ from ce_queue cq2 where cq.component_uuid=cq2.component_uuid and cq2.status <> 'PENDING' ) - order by cq.created_at asc, cq.id asc + <include refid="orderByDateAndId"/> </select> <insert id="insert" parameterType="org.sonar.db.ce.CeQueueDto" useGeneratedKeys="false"> |