MTM Snapshot Exclusive Access

Top  Previous  Next

Background

Creating snapshots affect ALL assets in Mark to Market, so when you select the Create snapshot button, Agiblocks needs to freeze or “lock” a lot of data in the Agiblocks database to prevent changes being made while the snapshot is being made.

 

If your database is very large, this database lock may be in effect for several minutes.  If a lot of other actions are being executed at the same time the snapshot is being made, it means that there are a lot of opportunities for other data to be updated. As the Create snapshot function has locked the database, this can have the effect that various actions get blocked and a user gets a timeout or database error while creating a snapshot.  

 

Snapshot Optimizations

This situation has been resolved by making sure the snapshot procedure has exclusive access to the Mark to Market data.  If other actions that need Mark to Market access are done while the snapshot process is on-going, the other actions are forced to wait for it to complete.  The screens which will be impacted are:

 

Mark to Market screen
P&L Insight
Position
Unrealized P&L
Realized P&L
Period closing (Reporting period status)
Roll position
Re-estimation of all assets against latest market data

 

If you open these screens while a snapshot is running, they will show a message to indicate that a snapshot is being created at the moment and that you best try again later.

 

Snapshot wait on PandLInsight

Snapshot wait Positionjpg

 

Though you will be forced to wait until the snapshot procedure is finished, this change will speed up the snapshot process. The database no longer needs to work so much as request to update data are put in a queue and the database doesn’t need to process them until the snapshot process is finished.

 

Another optimization makes sure that before the snapshot procedure begins, any pending Mark to Market updates that are waiting to be processed are completed before the snapshot starts.  Any Mark to Market updates made while the snap shot process is executing are held until the snapshot is complete and then processed.