Skip to content

Fix index-state falling back warning #8086

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hamishmack
Copy link
Collaborator

I think it should only be a warning here if ts0 > isiHeadTime isi.

My understanding is that isiMaxTime isi <= isiHeadTime isi (is that correct?) and that since isiMaxTime isi is calculated on the filtered index isiMaxTime isi <= ts0.

I think it should only be a warning here if `ts0 > isiHeadTime isi`.

My understanding is that `isiMaxTime isi <= isiHeadTime isi` (is that correct?) and that since `isiMaxTime isi` is calculated on the filtered index `isiMaxTime isi <= ts0`.
@jneira
Copy link
Member

jneira commented Apr 6, 2022

Makes sense, thanks for the fix. A regression test to ensure the correct behaviour and a changlog entry would be needed imo

@Martinsos
Copy link
Collaborator

Thanks for adding me as a reviewer -> I do have to admit that at this point I don't understand enough context here to be able to provide assessment of the change, but it does help with learning more about how Cabal works!

I don't quite comprehend difference between head and max time -> so max time is the oldest timestamp among the timestamps of all the filtered cache packages, where filtered cache packages are all the packages from the local package cache that match the versions from the specified index state (or are just not older than it)? And head time is the time of the index state itself? OK, so that is why head time is always >= max time, that makes sense.

And then in this piece of code that is modified in this PR, we want to return package source based on specified index state (which is either a timestamp or HEAD, where HEAD means latest)? I am confused with the check of when (isiMaxTime isi /= ts0) -> I thought isiMaxTime is oldest timestamp from filtered cache packages (filtered related to specific index state timestamp), so what does this check even mean, why would we care about /= relationship here? But I must have gotten smth wrong, probably the meaning of maxTime.

@Mikolaj Mikolaj requested a review from jneira April 8, 2022 11:18
@andreabedini
Copy link
Collaborator

andreabedini commented May 5, 2022

I think this is part of the problems I am fixing in #7934. In my patch I changed the code around a bit and that comparison got removed.

I take this back. I was mistaken.

@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Sep 1, 2022
@ulysses4ever ulysses4ever removed the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Sep 3, 2022
@Kleidukos Kleidukos marked this pull request as draft May 17, 2023 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants