Skip to content

FIX: Add microseconds to the webpoda queries#292

Merged
greglucas merged 2 commits intoIMAP-Science-Operations-Center:mainfrom
greglucas:webpoda-microseconds
Jan 20, 2026
Merged

FIX: Add microseconds to the webpoda queries#292
greglucas merged 2 commits intoIMAP-Science-Operations-Center:mainfrom
greglucas:webpoda-microseconds

Conversation

@greglucas
Copy link
Contributor

When doing <= queries, we need to make sure we go up to the end of the time interval. If a packet had a timestamp of 23:59:59.2 then that wouldn't be caught by a query of <= 23:59:59 because there is an implicit floor in the backend web API.

An alternative option would be to change from less-than-or-equal to "add one second and then do a less-than comparison instead. I'm indifferent, so if anyone else has a preference for the other way, then I'm happy to change it to that.

closes #291

When doing <= queries, we need to make sure we go up to the end of
the time interval. If a packet had a timestamp of 23:59:59.2 then that
wouldn't be caught by a query of <= 23:59:59 because there is an
implicit floor in the backend web API.
@greglucas greglucas requested a review from tech3371 January 20, 2026 03:16
@greglucas greglucas self-assigned this Jan 20, 2026
@greglucas
Copy link
Contributor Author

Actually, I just saw this note:

# NOTE: All queries are <= / >= following this, so we need to make sure we
# are not double grabbing packets into the pointings.
# The times included are [repointing_start, repointing_end), exclusive
# on the right edge

Maybe we do want to switch over to be less-than on the right edge...

Rather than trying to add maximum values to times, we can switch
over to using an exclusive right edge with a less-than comparison.
This helps avoid issues with microsecond precision in the database
timestamps when we were only querying with seconds resolution before.
Copy link
Contributor

@subagonsouth subagonsouth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the strictly less than comparison on the end time. Looks good to me.

@greglucas greglucas merged commit ae28ac2 into IMAP-Science-Operations-Center:main Jan 20, 2026
16 checks passed
@greglucas greglucas deleted the webpoda-microseconds branch January 20, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG - webpoda queries can miss packets on day boundaries

2 participants