<p></p>
<p><b>@gravitystorm</b> commented on this pull request.</p>
<p dir="auto">+1 for making the queue more fair.</p>
<p dir="auto">I think the risk with this approach is that if someone adds 1000 traces, and then keeps adding more batches 50 at a time before the original 1000 are complete, then the final traces from the original batch (e.g. with priorities 990-999) might sit in the queue for a long long time, while subsequent traces are processed first (since they go in the queue with e.g. 400-450).</p>
<p dir="auto">I'm not sure if I'm overthinking this though, maybe it's not a real problem.</p>
<p dir="auto"><a href="https://www.salsify.com/blog/engineering/queue-fairness" rel="nofollow">https://www.salsify.com/blog/engineering/queue-fairness</a> touches on this same topic (this PR implements "the first solution" and it doesn't seem straightforward to implement a better algorithm at the point of dequeuing (rather than setting the priority at the point of enqueuing).</p>
<p dir="auto">I'm surprised there's no gems to do this, it seems quite a common topic to discuss fair dequeuing for multi-user queues</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4537#pullrequestreview-1899545332">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLK24EEQ2KJK5AEUME3YVIQ4ZAVCNFSM6AAAAABDYESJBCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQOJZGU2DKMZTGI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLKIC6CCWYTQWHLIXDDYVIQ4ZA5CNFSM6AAAAABDYESJBCWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTTRHDBPI.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4537/review/1899545332</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4537#pullrequestreview-1899545332",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4537#pullrequestreview-1899545332",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>