Brighter icon indicating copy to clipboard operation
Brighter copied to clipboard

[Bug] PagedOutstandingCommand query in MySQL Outbox subtracts seconds instead of milliseconds, causing OutboxSweeper to function incorrectly

Open romtur opened this issue 1 year ago • 2 comments

Describe the bug

PagedOutstandingCommand query in MySQL Outbox subtracts seconds instead of milliseconds, causing OutboxSweeper to function incorrectly. This should be an easy fix.

To Reproduce

Set up the OutboxSweeper with MinimumMessageAge set to 5000 milliseconds (5 seconds)

image

The OutboxSweeper will dispatch messages that are older than 5000 seconds (instead of 5 seconds) due to an incorrect query:

public string PagedOutstandingCommand { get; } = "SELECT * FROM {0} WHERE DISPATCHED IS NULL AND Timestamp < DATE_ADD(UTC_TIMESTAMP(), INTERVAL -?OutStandingSince SECOND) ORDER BY Timestamp DESC LIMIT ?PageSize OFFSET ?OffsetValue";

Further technical details

  • Brighter version: 1.0.0-preview.3
  • The OS: Windows

romtur avatar Jun 03 '24 15:06 romtur

This may be fixed now, will check and fix if not

iancooper avatar Jun 12 '24 10:06 iancooper

We may fix this by looking to move our API from milliseconds to TimeSpan for clarity @preardon @holytshirt @dhickie in V10

iancooper avatar Jul 10 '24 10:07 iancooper

Fixed as part of TimeSpan fixes

iancooper avatar Nov 21 '24 08:11 iancooper