Page MenuHomePhabricator

S9. LQT: Unique index flow_ext_ref_pk blocking false positives
Closed, ResolvedPublic2 Estimated Story Points

Event Timeline

matthiasmullie raised the priority of this task from to Medium.
matthiasmullie updated the task description. (Show Details)
matthiasmullie subscribed.

The easy way to punt on this is increase the size of the field, its current 256 but urls can obviously be bigger than that. In core they use a 'blob' type instead of varchar to hold many more characters, but we hold a unique index against this field, and indexes must have a specific length to include not just "all of a blob". One workaround could be to include an md5 of Reference::getTargetIdentifier() and use that as the primary key.

also note that the links in the description arn't the ones that trigger the error, those are < 100 characters. There is another link in that post that is several hundred characters

I've updated with the real links it was failing on: 369 chars (those others were 156chars, it seems)

But with ref_src_namespace, ref_src_title & ref_type prefixing ref_target, the index will fill up way earlier than the column does (and the new examples also max out that one already)

DannyH renamed this task from Unique index flow_ext_ref_pk blocking false positives to S9. LQT: Unique index flow_ext_ref_pk blocking false positives.Mar 11 2015, 9:47 PM

Change 196660 had a related patch set uploaded (by Matthias Mullie):
Remove unique constraints from flow_*_ref

https://gerrit.wikimedia.org/r/196660

Change 196660 merged by jenkins-bot:
Remove unique constraints from flow_*_ref

https://gerrit.wikimedia.org/r/196660