-
Notifications
You must be signed in to change notification settings - Fork 25
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
Location Validation Timestamp Cache #938
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bbalser
reviewed
Feb 6, 2025
bbalser
reviewed
Feb 6, 2025
Test is failing due to different level of precision coming out of db than expected. |
bbalser
reviewed
Feb 6, 2025
kurotych
reviewed
Feb 6, 2025
andymck
reviewed
Feb 7, 2025
location_validation_timestamps are only valid within a 24 hour window of the time the heartbeat was received.
- rename cache methods to be more like cache methods. - validation timestamps that are in the past will not be cached. - validation timestamps older than 24 hours from the heartbeat will not be returned from the database. - cached locations that are older than 24 hours from the current hearbeat requesting a value will not be returned even if they still have a valid TTL.
- location validation timestamps must be within the last 24 hours. - LocationCache will only respect the 12 hour time limit when it's fresh.
reflect this in the name
The initial heartbeat has a validation timestamp that is just barely valid, so when the second heartbeat comes through over 24 hours past the validation timestamp, it will correctly not consider it.
… for comparing truncate to nanoseconds, some postgres DB version only store seconds up to 5 decimal places.
4c68a97
to
3f79329
Compare
cbd6ab3
to
b828bd3
Compare
bbalser
approved these changes
Feb 7, 2025
kurotych
approved these changes
Feb 10, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Heartbeats from radios come with a
location_validation_timestamp
, which is the last time a radio had it's location validated.A
location_validation_timestamp
is valid for up to 24 hours from the first time it was received in a heartbeat.Previously, we assumed that a heartbeat with a
location_validation_timestamp
had already passed this check. That has been found to not be the case. So "validated heartbeats" were being output withlocation_validation_timestamp
's far in the past.Now, we are correctly verifying that a
location_validation_timestamp
is within 24 hours of the first received heartbeat that declared it.