Open mkdir-washington-edu opened 5 years ago
Maybe related to: https://hypothes-is.slack.com/archives/C0LUWQQJJ/p1548872758005100
Also see slack convo.
Brief root cause of this issue was it was due to the claimant normalized uri being too large to index in the db and so the annotation failed to be written to the db. This appears to have happened 226 times to 8 users over the last week.
Additional requesters: https://hypothesis.zendesk.com/agent/tickets/6246
I'd like to propose a third "possible solution": change the way we're indexing this uniqueness constraint. Instead of enforcing unique on (claimant_normalized
, type
) as we do at present (https://github.com/hypothesis/h/blob/f41b7bfb7153006fd094bb0be4bdd2e6d5b28f95/h/models/document.py#L148), we might consider enforcing unique on ([some hashed representation of] claimant_normalized
, type
). This would fix the problem without having to mutate data.
Some nice discussion here: https://dba.stackexchange.com/a/25140
Please see my analysis on the duplicate issue https://github.com/hypothesis/h/issues/5713#issuecomment-535542175. I think there are some other steps we can take first which will solve the problem more usefully for users.
https://hypothesis.zendesk.com/agent/tickets/6123 When the user went to save an annotation, they received the error "Saving annotation failed 500" (see pic). The normalized URI was too large to be indexed in the DB.
Sentry issue: https://sentry.io/organizations/hypothesis/issues/1214722226/events/eb073c04ffb044a4a632fa59580945c2/?project=37293&statsPeriod=24h#