skyportal icon indicating copy to clipboard operation
skyportal copied to clipboard

Photometry deduplication logic does not exclude record being updated when checking against existing records

Open acrellin opened this issue 5 years ago • 3 comments

A PATCH or PUT request can lead to a duplication error b/c the new data will be checked against the corresponding existing record, leading to an error if none of the values in the deduplication index are being changed.

acrellin avatar Apr 23 '21 20:04 acrellin

Yes this is not good, we should allow PK mutations. Currently our order of ops is: 1. Check for duplicates. 2. Mutate. 3. Commit.

Perhaps we can fix this by simply reversing the above? I.e., 1. Mutate 2. Check for duplicates, 3. Commit?

dannygoldstein avatar Apr 24 '21 16:04 dannygoldstein

@profjsb @guynir42 Do we know understand this well enough to make it actionable?

mcoughlin avatar Jun 24 '22 18:06 mcoughlin

I think I know what they are talking about.

guynir42 avatar Jun 27 '22 17:06 guynir42