Locking and long-running update operations

Tuesday, 3 April 2012 · 3 messages
J
Johannes.Lichtenbergerin reply to Charles Duffy, 3 Apr 2012, 20:433 Apr 2012 19:10 #
Quoted text · Charles Duffy · 10 lines
On 04/03/2012 06:43 PM, Charles Duffy wrote: > I have a set of expensive cached data which requires about ~20 minutes > to refresh/recalculate. However -- while this recalculation is running > (via a single XQUF operation), read queries against the same database > are unable to operate. > > My expectation is that the old, pre-update data will remain continually > available until the update commits. If this expectation is incorrect, > what is the suggested mechanism for running such expensive updates > without impacting availability?
I think snapshot isolation is planned for a future release. kind regards, Johannes
CD
Charles Duffy3 Apr 2012 20:43 #
I have a set of expensive cached data which requires about ~20 minutes to refresh/recalculate. However -- while this recalculation is running (via a single XQUF operation), read queries against the same database are unable to operate. My expectation is that the old, pre-update data will remain continually available until the update commits. If this expectation is incorrect, what is the suggested mechanism for running such expensive updates without impacting availability?
CD
Charles Duffyin reply to Johannes.Lichtenberger, 3 Apr 2012, 19:103 Apr 2012 21:28 #
Quoted text · Charles Duffy · 12 lines
On 04/03/2012 12:10 PM, Johannes.Lichtenberger wrote: > On 04/03/2012 06:43 PM, Charles Duffy wrote: >> I have a set of expensive cached data which requires about ~20 minutes >> to refresh/recalculate. However -- while this recalculation is running >> (via a single XQUF operation), read queries against the same database >> are unable to operate. >> >> My expectation is that the old, pre-update data will remain continually >> available until the update commits. If this expectation is incorrect, >> what is the suggested mechanism for running such expensive updates >> without impacting availability? > I think snapshot isolation is planned for a future release.
I see. Are there widely used practices to workaround lack of support presently (such as staging pending updates in a different database and then doing copy operations)? The ability to execute an update list immediately (thus breaking down a large operation into smaller, shorter transactions) might also be helpful. I suppose that worst-case, this could be done by having XQuery code call the REST API via the HTTP module to run atomic, updating subqueries.

⚡Generated with XQuery