Wrong update of the status and attephstat fields in the satfiles table of the ancillary DB

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
mpenalver
Posts: 6
Joined: Thu Mar 07, 2019 7:47 pm America/New_York
Answers: 0

Wrong update of the status and attephstat fields in the satfiles table of the ancillary DB

by mpenalver » Tue Aug 06, 2019 6:45 am America/New_York

In modules.ancDB.insert_record, the status and attephstat fields in the satfiles table of the ancillary DB are updated for all the records instead of just the record that is being modified. Lines 95 to 98 should be changed to:
           if atteph:
               c.execute('''UPDATE satfiles
                                 SET attephstat = ?
                                 WHERE satid = ?''', [dbstat, satid])
         else:
               c.execute('''UPDATE satfiles
                                 SET status = ?
                                 WHERE satid = ?''', [dbstat, satid])

Filters:

OB.DAACx - SeanBailey
Posts: 1519
Joined: Wed Sep 18, 2019 6:15 pm America/New_York
Answers: 1
Been thanked: 9 times

Wrong update of the status and attephstat fields in the satfiles table of the ancillary DB

by OB.DAACx - SeanBailey » Tue Aug 06, 2019 7:02 pm America/New_York

Thanks :grin:
We'll see about adding this fix to the next update.

Sean

mpenalver
Posts: 6
Joined: Thu Mar 07, 2019 7:47 pm America/New_York
Answers: 0

Wrong update of the status and attephstat fields in the satfiles table of the ancillary DB

by mpenalver » Tue Aug 13, 2019 1:31 pm America/New_York

This issue might be related, because as a consequence the satfiles table remains on a state determined by the latest inserted record. So if this was missing some optimal anc files, a query for any other sat file will return the same result even if its corresponding anc files are present, hence leaving the DB in an inconsistent state. And the result for the same sat file will be different if queried after the insertion of another sat file for which all associated optimal anc files exist.

Post Reply