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

Modal location tiebreaker #6268

Closed
greenape opened this issue Aug 14, 2023 · 1 comment · Fixed by #6466
Closed

Modal location tiebreaker #6268

greenape opened this issue Aug 14, 2023 · 1 comment · Fixed by #6466
Labels
enhancement New feature or request FlowMachine Issues related to FlowMachine

Comments

@greenape
Copy link
Member

As evidenced by #5600, on occasion there may be ties in ModalLocation. As it stands, these are broken by arbitrary Postgres sort order, which can change between versions. Rather than rely on that, we should have a known and predictable tie breaker. One might be tempted to use random here, but that would actually prevent modal location queries from being parallelised, so probably better to use something else.

I think an obvious way to go here would be to extend the existing tie break logic, which uses the most recent of tied daily locations, to something like the most recent call. This would however require daily location objects to include the last included datetime. Arguably this would be to the good anyway, as we could then dispense with the slightly awkward post-attach of the corresponding date.

@greenape greenape added enhancement New feature or request FlowMachine Issues related to FlowMachine labels Aug 14, 2023
greenape added a commit that referenced this issue Mar 6, 2024
@greenape
Copy link
Member Author

greenape commented Mar 6, 2024

This should in fact refer to MostFrequentLocation, because ModalLocation already does do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request FlowMachine Issues related to FlowMachine
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant