Page MenuHomePhabricator

Prevent creation of properties having the same label
Closed, DeclinedPublic

Description

As a Wikidata editor, I want property labels to be unique per language at all times, so that different properties don’t get confused for one another (and so that the {{#statements:propertyName}} parser function is unambiguous).
As a Wikibase developer, I want hard constraints to actually be enforced as strictly as reasonably possible.

Problem:
While working on T289473, we realized that there’s a possible race condition when creating properties, very similar to T291377: if you simultaneously create two properties with the same label, it’s possible that both of them will save successfully, and you’ll have two properties with the same label, even though property labels are supposed to be unique.

Example:
Not yet tested.

Screenshots/mockups:

BDD
GIVEN
AND
WHEN
AND
THEN
AND

Acceptance criteria:

Open questions:

Event Timeline

Given that properties are typically not created as rapidly as items, that property label uniqueness is arguably less critical than sitelink uniqueness (I believe we generally encourage using property IDs instead of labels in the {{#statements:}} and {{#property:}} parser functions), and that solving this would not only require development work but also put more load on the primary database, I strongly suggest that we acknowledge the issue, but mark this task as declined, and do not invest work in fixing it.

Agree with that. Already T289473 seemed rare to me.

Lydia_Pintscher subscribed.

I just discussed this with Lucas. It seems extremely rare for this to occur so let's not bother until it becomes an actual problem.