MathematicalMedicine / diver-issues

Semipublic tracking of issues for the DIVER front end
0 stars 0 forks source link

Insert operations into cohortInds should always SELECT DISTINCT #259

Closed Viqsi closed 1 month ago

Viqsi commented 1 month ago

Related to (but does not actually fully resolve) #248.

This is a small code change that I'm taking on to non-destructively remove a number of the more common issues that #248 covers, in which the ind_id and value being provided are exactly the same. It'd address that particular manifestation of the problem, which appears to be by far the most common case. (@WValenti was considering use of INSERT IGNORE instead of a SELECT DISTINCT; I had objected because while that masks all instances of the problem, I was concerned it'd mask even more potentially unanticipated issues (since INSERT IGNORE only handles the primary key, and cohortInds' primary key doesn't include value); we had an extensive discussion about same offline and ultimately agreed on this approach).

The net result is/will be that there are still variables out there that would cause crashes because of the issue described in #248, but fully fixing all of them could take weeks or even months, and we don't have that kind of time available, and some degree of Group Decisions would play into that. But this way we at least get most of them. Probably. It's making progress while we get a better handle of the scope of the greater problem.

Viqsi commented 1 month ago

So. Funny thing, actually. This is already the case and has been for quite a while. No code changes necessary. We had ourselves a bit of a communications issue in that this particular class of issues was actually already accounted for. So the problem wasn't as large as we expected. It was showing similar symptoms on the backend, but without the resulting frontend explosion (and was correct in not-exploding).

So... Issue closed. Good work, everyone.