Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
romtur opened this issue Jun 3, 2024 · 2 comments
Assignees
Labels
0 - Backlog Bug v10 Allocal to a v10 release

Comments

@romtur
Copy link

romtur commented Jun 3, 2024

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
@iancooper
Copy link
Member

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

@iancooper iancooper self-assigned this Jun 12, 2024
@iancooper iancooper added the v10 Allocal to a v10 release label Jul 10, 2024
@iancooper
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Backlog Bug v10 Allocal to a v10 release
Projects
None yet
Development

No branches or pull requests

2 participants