Hi! Guys,
good day!
I wonder why there's no 'lockbreather' function definition in the Help. Actually I don't know what its use is. I just see it in my colleagues' code but I don't bother to ask, so I search for it and no version has its definition and function. Please someone explain to me.
Thanks!
bunchukokoy
What is LockBreather?
-
- Regular Participant
- Posts: 197
- Joined: Thu Dec 03, 2009 8:47 am
- OLAP Product: IBM Cognos TM1
- Version: 10.2.2.x
- Excel Version: 2010
- Location: Singapore
-
- Site Admin
- Posts: 6647
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: What is LockBreather?
Curiously, I can find this referred to in only one document; the 8.4.5 release notes. I'm guessing that it was an evolutionary dead end which became redundant, especially after the new locking model was released in 9.1. Anyway, just for laughs here's how it's described:bunchukokoy wrote: I wonder why there's no 'lockbreather' function definition in the Help. Actually I don't know what its use is. I just see it in my colleagues' code but I don't bother to ask, so I search for it and no version has its definition and function. Please someone explain to me.
8.4.5 Release Notes wrote:The following features were introduced in previous TM1 8.4 releases.
New LockBreather TurboIntegrator Function
This new function forces a TurboIntegrator process to take a ‘breather’ and check for pending write requests issued against the TM1 server. The LockBreather function can be used only after the LockOff function has been executed and before the LockOn function has been executed.
Syntax
LockBreather;
Arguments
None
Examples
When the LockOff function is executed in a TurboIntegrator process, TM1 automatically issues a breather after every 100 records in the data source are processed. This ensures that write requests have regular access to the TM1 server during process execution. However, if a TurboIntegrator process includes a lengthy While loop, the amount of time between breathers can become unacceptably long.
For example, consider a TurboIntegrator process using an ASCII data source with 100,000 records. After the LockOff function is called in this process, a breather should occur every 100 records (multiple times a second) and the entire process should take less than ten seconds to execute.
If you add the following While loop to the Data procedure, the amount of time required to process each record in the data source increases from less than one second to approximately twenty seconds:
With the introduction of the While loop, the breather now occurs approximately every 2000 seconds (20 seconds per record x 100). In this scenario, you can use the LockBreather function to increase the breather frequency. Modify the code above as follows:Code: Select all
i=0; while (i<5000000); i=i+1; end;
With the above modification, the breather occurs 50 times in the 20 seconds it takes to execute the While loop.Code: Select all
i=0; z=0; while (i<5000000); if (z=100000); LockBreather; z=0; endif; i=i+1; z=z+1; end;
Similarly, if TurboIntegrator is processing a data source over a WAN, a breather every 100 records may not be sufficient due to latency issues. In this circumstance, you can add a counter to the process and use the LockBreather function to force a breather at more frequent intervals. For example, to force a breather every 50 records, initialize the counter (i) to 0 in the Prolog procedure and add the following code to the Data procedure:Code: Select all
i=i+1; if(i=50); LockBreather; i=0; endif;
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Regular Participant
- Posts: 197
- Joined: Thu Dec 03, 2009 8:47 am
- OLAP Product: IBM Cognos TM1
- Version: 10.2.2.x
- Excel Version: 2010
- Location: Singapore
Re: What is LockBreather?
Wow!
Thanks! Allan,
It's clear to me now. Great! Thanks!
bunchukokoy

Thanks! Allan,
It's clear to me now. Great! Thanks!
bunchukokoy


-
- MVP
- Posts: 3702
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: What is LockBreather?
LockOn
LockOff
LockBreather
AllowExternalRequests
ReadersBypassWriters
all dead and buried, may they rest in peace.
LockOff
LockBreather
AllowExternalRequests
ReadersBypassWriters
all dead and buried, may they rest in peace.
-
- Regular Participant
- Posts: 197
- Joined: Thu Dec 03, 2009 8:47 am
- OLAP Product: IBM Cognos TM1
- Version: 10.2.2.x
- Excel Version: 2010
- Location: Singapore
Re: What is LockBreather?
Uhm,
May I know, what do you mean 'All dead and buried'?
Do you mean that none of these functions are usable, because they're not recognized by TM1 anymore?
Or simply because, these are seldom used?
Why do you say so?
Thanks!
May I know, what do you mean 'All dead and buried'?
Do you mean that none of these functions are usable, because they're not recognized by TM1 anymore?
Or simply because, these are seldom used?
Why do you say so?
Thanks!
-
- MVP
- Posts: 3702
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: What is LockBreather?
While these functions (and parameters in the case of ReadserBypassWriters) will not cause any errors they are redundant and now have no real effect or meaning in 9.1, 9.4 and 9.5 due to changes in the TM1 object locking model.