[gold-users] Tracking project update history

Scott Jackson scott at clusterresources.com
Thu Aug 23 15:30:35 MDT 2007


Let's say I changed the Description for the Project Biology from
"Biology Department" to "Bio-Informatics" and I wanted to look back and
see evidence of what happened.

Here's what Gold provides:

1) Transaction Detail

$ glstxn -O Project -A Modify
Id   Object  Action Actor   Name        Child JobId Amount Delta Account
Project User Machine Allocation Count Description     
---- ------- ------ ------- ----------- ----- ----- ------ ----- -------
------- ---- ------- ---------- ----- --------------- 
1086 Project Modify scottmo biology
1     Bio-Informatics 

or if you want to pick the fields you get:

$ glstxn -O Project -A Modify
--show="ModificationTime,Actor,Object,Action,Name,Description"
ModificationTime    Actor   Object  Action Name        Description     
------------------- ------- ------- ------ ----------- --------------- 
2007-08-23 15:10:04 scottmo Project Modify biology     Bio-Informatics 

2) Time Travel (Journal Mining)

The only way I can think of to get the previous value is to do a little
time travel to ask the object what its value was at a time immediately
before the transaction date. You would have to use the above transaction
queries to figure out what dates to use in the query.

$ goldsh Project Query Name==biology Time:=\"2007-08-23 15:10:03\"
Name    Active Organization Description        
------- ------ ------------ ------------------ 
biology True                Biology Department

You can see what the value has changed to immediately after the
modification time.

$ goldsh Project Query Name==biology Time:=\"2007-08-23 15:10:05\"
Name    Active Organization Description     
------- ------ ------------ --------------- 
biology True                Bio-Informatics 

3) Direct Database Query

You can kind-of get a history by directly querying the objects and their
journals.

$ psql gold

gold=# select * from g_project_log where g_name='biology' union select *
from g_project where g_name='biology'; 
 g_creation_time | g_modification_time | g_deleted | g_request_id |
g_transaction_id | g_name  | g_active | g_organization | g_special |
g_description    
-----------------+---------------------+-----------+--------------+------------------+---------+----------+----------------+-----------+--------------------
      1174933197 |          1174933197 | False     |          280 |
277 | biology | True     |                | False     | Biology
Department
      1174933197 |          1187903404 | False     |         2461 |
1086 | biology | True     |                | False     | Bio-Informatics
(2 rows)

I hope that helps.

Scott


On Tue, 2007-08-14 at 14:51 -0700, Senthil Subramanian wrote:
> Hi,
> 
> Does GOLD allow us to track project update history? Something like: 
> Project description for project P was changed from D1 to D2 by user U at 
> time T.
> 
> If not, is it simple to extend GOLD to provide such a functionality?
> 
> Thanks,
> Senthil
> _______________________________________________
> gold-users mailing list
> gold-users at supercluster.org
> http://www.supercluster.org/mailman/listinfo/gold-users



More information about the gold-users mailing list