Opened 12 years ago
Closed 12 years ago
#98 closed (fixed)
the contact table does not contain a last_update field
Reported by: | chaos@bbn.com | Owned by: | chaos@bbn.com |
---|---|---|---|
Priority: | minor | Milestone: | gmoc.py data submission debugging |
Component: | Database | Version: | |
Keywords: | Cc: | ||
Dependencies: |
Description
The gpo-infra contact in gmoc-db2 looks like this:
(183,'gpo-infra@geni.net','GPO','Infrastructure Group',NULL,NULL,0,'',0,'urn:publicid:IDN+gmoc.geni.net+contact+gpo-infra_geni.net');
There is no indication of when that entry was last updated. The contact table should have and update a last_update
timestamp the way other reported data tables do, so that stale data can be identified eventually.
Change History (9)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
MySQL has a way to auto update a timestamp in a field in the DB when the row is touched.
comment:3 Changed 12 years ago by
Yeah, so, afaict, they're not using that in any of the tables. I assume the wrapper which updates the data is setting these fields. This looks the same in contact:
CREATE TABLE `contact` ( ... `last_update` int(10) default NULL,
as it does in e.g. sliver:
CREATE TABLE `sliver` ( ... `last_update` int(10) NOT NULL,
I assume the wrapper script which updates the database is what's setting this, and that's fine. (That is, i am emphatically not requesting that they change the way they're doing this globally.)
The issue is that entries in the contact table don't get updated when matches are found. This is probably related to 105 as well. I believe that when a contact matching the e-mail address is found, it's just used, and no update is done. This is as opposed to sliver, where changed fields are updated when a match is found.
comment:4 Changed 12 years ago by
From discussion on-channel: the observed problem here (the last_update field doesn't get updated) is the tip of the iceberg of the real problem (when a contact whose URN already exists in the database is resubmitted, non-URN fields do not get updated).
Sarah says she and Kevin will work on that.
comment:5 Changed 12 years ago by
We had a brand new contact added as part of another test:
(197,'chaos@bbn.com','Chaos','Golubitsky',NULL,NULL,0,'',0,'urn:publicid:IDN+p geni.gpolab.bbn.com+user+chaos',NULL);
So that makes it clear that last_update is not being updated, since a new entry has no value set.
comment:6 Changed 12 years ago by
Owner: | changed from somebody to chaos@bbn.com |
---|---|
Status: | new → assigned |
Kevin says this is fixed; i'll try to test it.
comment:7 Changed 12 years ago by
Status: | assigned → new |
---|
comment:8 Changed 12 years ago by
I reported the contact:
<contact email="cgolubit@bbn.com" given_name="Chaos" last_name="Golubitsky" urn="urn:publicid:IDN+pgeni.gpolab.bbn.com+user+cgolubit"/>
which should be new in the database. I'll ask someone to get me that record after lunch, and we'll see if it has last_update set.
comment:9 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Here's the codepad: http://codepad.org/0yKQWDzT. The cgolubit user has last_update=1349282511, which is non-null. So this is fixed now.
The
last_update
timestamp has been added to the database, but it does not get updated when contact information is submitted again. For instance, we still have: