Open wolfsage opened 2 months ago
does that matter?
Not practically, I think.
But the indexer has two cases it must handle sensibly:
I think the end result is identical in both cases, in which case uploading both at the same time very definitely should not lead to a different result.
But if the end results of these cases are different from each other, then uploading both at the same time should yield the same result as one or the other, not an entirely separate third type. (Even at random, if that makes this case easier to handle – still better than a separate type of result.)
There are really three cases:
Thanks. I can see the decreasing version case making sense in its own terms but it seems to me that it should not happen unless the PAUSE author explicitly causes it – which means that if at all possible the race condition case should have the same behavior as the usual case.
Is it possible to de-dupe the mldistwatch invocations, such that Foo@1.2 just won’t be picked up for indexing immediately?
If you upload Foo@1.1 and Foo@1.2 at the same time, mldistwatch will be started for each of them. They can then deadlock when trying to update the primeur table.
We should prevent (if possible) indexing of the same dist in parallel to avoid this problem.
Alternatively, we can say "If you upload 1.1 and 1.2, we just won't index 1.1 since 1.2 will replace it". (The risk here is if 1.1 has modules in it 1.2 doesn't, but does that matter?)