-
Notifications
You must be signed in to change notification settings - Fork 3
receiver_deployment_id associated with multiple receiver_name in valid_detection table #133
Comments
@xhoenner here's the query I used: select * from (
select distinct
receiver_deployment_id,
count(distinct receiver_name) as distinct_receivers_count,
array_to_string(array_agg(distinct receiver_name), ',') as receiver_names
FROM valid_detection
group by receiver_deployment_id
order by receiver_deployment_id
) distinct_receivers
where distinct_receivers_count > 1
to get results:
Does this match with what you see? |
@jkburges yes it does, see below: |
@danfruehauf I've got a pretty good idea of what's happened here now I think. Let's look at the last couple: receivers VR2W-110432 and VR2W-110433 Run this query: select * from aatams.audit_log
where new_value like '%110432%'
or new_value like '%110433%'
order by date_created You will see that for audit log having id 84440353, a deployment's receiver was changed from VR2W-110432 to VR2W-110433. My guess is that the sequence of events is thus:
Voila, we have the situation described above. I bet we can re-create this pretty easily without having to load production data. I can help you with this tomorrow. Note: the audit log feature wasn't in there from the start, so some of the smaller ids don't have corresponding audit log entries. |
In terms of fixing it, there are two parts:
|
@jkburges I managed to reproduce the problem. Should I change the description of this bug? |
Yes, I would change the "Steps to reproduce" in the OP given what we now know, and move the SQL to under "what happens", i.e. how you can tell there's a problem. |
@pblain @danfruehauf I don't think we should attempt to fix this without first discussing the pros and cons of the possible fixes mentioned in #133 (comment) |
Part of why I returned it to the board. I think it was a bit too big for me to attempt and fix it as one of my first AATAMS tasks. |
In that case we should remove it from the board and replace with a more manageable bug to fix. It doesn't matter which, as long as we keep ratcheting them down. |
Steps to reproduce:
select count(*) from valid_detections where receiver_name='R1'
)What happens:
Deployment D will contain both detections from receiver R1 and receiver R2.
In production, some receiver_deployment_id records are associated with different receiver names, to see duplicate receivers for a deployment, you can run:
What should happen:
Only detections from receiver R2 should be valid for deployment D, in other words, each receiver_deployment_id should be associated with a unique receiver_name.
The text was updated successfully, but these errors were encountered: