pause icon indicating copy to clipboard operation
pause copied to clipboard

DO NOT MERGE! No more deadlocks

Open wolfsage opened this issue 2 years ago • 3 comments

Fixes #406

This cannot be done until the database is cleaned up of duplicates however. (Soon, I hope!)

To use this, we'll first have to do:

ALTER TABLE perms MODIFY `package` char(245) NOT NULL DEFAULT '';
ALTER TABLE packages MODIFY `package` varchar(128) NOT NULL DEFAULT '';
ALTER TABLE primeur MODIFY `package` char(245) NOT NULL DEFAULT ''; 

wolfsage avatar Apr 30 '23 15:04 wolfsage

Hi Matthew, could you please consider the scenario that people change case within their releases over time? Will the code in the MR properly deal with this? I believe proper handling of this would be a rejection. From reading the idea to make the package column case-insensitive I get the impression that mysql might lose control of the correct case sensitive package names. The idea came up while talking with @neilb about RLAUGHLIN/UDPmsg-0.10.tar.gz vs RLAUGHLIN/UDPmsg-0.11.tar.gz and about SHERZODR/CGI-Session-3.95 vs MARKSTOS/CGI-Session-4.48. There are more such examples in the history of the CPAN, where individual files within a package changed case. Breaks code on case-sensitive file systems. It follows quite naturally from working on a case insensitive filesystem, that developers make such changes, but it is something a repository like CPAN should politely not support.

I hope I'm not opening a can of worms with this question.

andk avatar May 20 '23 06:05 andk

I think we should allow / support people changing the case of their modules. Most of the examples I've seen have been internal modules, not really intended for direct public use. But I'm sure there will have been cases where people have changed the case of public-facing modules.

We already support changing case of modules in the indexer – the canonicaliser makes sure that all permissions are switched to the new casing. This works right now, I'm pretty sure, it's just historical cases that we're clearing up. The main thing is to ensure @wolfsage's change doesn't break that (I've not looked at it).

Yes this can cause problems, but it's a natural thing for people to do. For example, where there's a large project with multiple contributors, and someone adds a module that doesn't following their naming convention, so at some later date someone wants to bring it in line.

It's worth a blog post talking about the problems this can cause, so people are aware, and it would be even cooler if PAUSE could spot when this happens and direct people to the blog post (though most people don't read the emails from PAUSE, so shrug).

neilb avatar May 20 '23 09:05 neilb

I can't see how this change would cause that problem but I suggest we (I) write a test case if one doesn't already exist to account for this before merging.

wolfsage avatar May 23 '23 02:05 wolfsage

Thanks, we let this be superceded by #440 but we cherry-picked the commit "mldistwatch: Rewrite perms/primeur in the transaction" from here. Deployed a few minutes ago.

andk avatar Apr 26 '24 14:04 andk