RFR: 1962: JiraProject#queryIssues may return duplicate issues [v2]
Zhao Song
zsong at openjdk.org
Wed Oct 25 17:35:17 UTC 2023
> Since [SKARA-1912](https://bugs.openjdk.org/browse/SKARA-1912) deployed into prod, we have noticed occurrences of duplicate key exceptions in the IssueProjectPoller#updatedIssues.
>
> After investigation, we found that `JiraProject#queryIssues` may return duplicate issues and I think the pagination in this method is the root cause.
>
> The problem here is that, sometimes, issues will be updated during the pagination process. For example, the default page size is 50 and we assume that issue#50 is the last issue in the first page. And before querying the second page, another issue which not in the first page got updated, so issue#50 will also be the first issue in the second page. Therefore, the method may return duplicate issues.
>
> Erik's solution is right. We just need to order by updatedTime DESC and remove the duplicate issues. Ordering by updatedTime DESC would make sure that even some issues are updated during the pagination, the issues will be processed in the future round.
Zhao Song has updated the pull request incrementally with one additional commit since the last revision:
add log
-------------
Changes:
- all: https://git.openjdk.org/skara/pull/1575/files
- new: https://git.openjdk.org/skara/pull/1575/files/7f36bb16..2a2d70f2
Webrevs:
- full: https://webrevs.openjdk.org/?repo=skara&pr=1575&range=01
- incr: https://webrevs.openjdk.org/?repo=skara&pr=1575&range=00-01
Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/skara/pull/1575.diff
Fetch: git fetch https://git.openjdk.org/skara.git pull/1575/head:pull/1575
PR: https://git.openjdk.org/skara/pull/1575
More information about the skara-dev
mailing list