Re: [U2] Record lock
Nicholas ( any newbies listening in), Just to make sure all bases are covered: 1. LIST.READU's EVERY keyword. Besides showing group locks, it will also, at the very end, show who is waiting on a lock. If there are 2 lines where waiter lock-holder are reversed on the 2nd line, you have a deadlock. 2. There is also a deadlock daemon that you can run or not run as you wish. If you turn it off, closely monitor it manually, you can find the offending code. Both processes will hang until you find it log one off. PORT.STATUS can then tell you what code is being executed when the deadlock hit the 2 offending processes. PORT.STATUS PID [pid] LAYER.STACK is especially useful. 2b. The deadlock daemon's log can give you a history of when deadlocks were found. My last 2 entries were last June August: Wed Jun 01 15:49:07 2011 - Deadlock detected (victim User 61023) Mon Aug 01 17:05:57 2011 - Deadlock detected (victim User 5380) 3. If you have writes without explicit readus preceding them, UV will wait for a readu lock behind the scenes, but it won't tell you about it in the LIST.READU waiter section. You can change the default behaviour. I think deadlock daemon handles this, but I don't recall for certain. On 3/26/2012 2:19 AM, Namacha, N. (Nicholas) wrote: The issue here is to try and monitor for deadlocks. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Record lock
Thanks Guys I think I will see if I come up something along the lines with the suggestion given by Wjhonson of scouring the lock table, and updating a lock table history file. The issue here is to try and monitor for deadlocks. Nedbank Limited Reg No 1951/09/06. The following link displays the names of the Nedbank Board of Directors and Company Secretary. [ http://www.nedbank.co.za/terms/DirectorsNedbank.htm ] This email is confidential and is intended for the addressee only. The following link will take you to Nedbank's legal notice. [ http://www.nedbank.co.za/terms/EmailDisclaimer.htm ] ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Record lock
I don't know about Universe but UniAdmin displays the time the lock was set in UD. On 23/03/2012 06:06, Namacha, N. (Nicholas) wrote: Is it possible to know for how long a record has been locked in universe? Kind Regards Nicholas Namacha Nedbank Limited Reg No 1951/09/06. The following link displays the names of the Nedbank Board of Directors and Company Secretary. [ http://www.nedbank.co.za/terms/DirectorsNedbank.htm ] This email is confidential and is intended for the addressee only. The following link will take you to Nedbank's legal notice. [ http://www.nedbank.co.za/terms/EmailDisclaimer.htm ] ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Record lock
There is no way of which I know, in Universe natively, to figure out what time a lock was set. Years ago, I wrote a job that woke up every five minutes, scoured the lock table, and updated a lock table history file. Then at any time, you could query that history to how long a lock had been open or was yet open. So if this is a consistent problem, you might think of doing that. It doesn't really take a lot of effort, just make sure you test it well. -Original Message- From: Mecki Foerthmann mec...@gmx.net To: u2-users u2-users@listserver.u2ug.org Sent: Fri, Mar 23, 2012 1:08 am Subject: Re: [U2] Record lock I don't know about Universe but UniAdmin displays the time the lock was et in UD. On 23/03/2012 06:06, Namacha, N. (Nicholas) wrote: Is it possible to know for how long a record has been locked in universe? Kind Regards Nicholas Namacha Nedbank Limited Reg No 1951/09/06. The following link displays the names of the Nedbank Board of Directors and Company Secretary. [ http://www.nedbank.co.za/terms/DirectorsNedbank.htm ] This email is confidential and is intended for the addressee only. The following link will take you to Nedbank's legal notice. [ http://www.nedbank.co.za/terms/EmailDisclaimer.htm ] ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Record lock
Problem is if a lock was set multiple times within that 5 minute interval, it could look like It had been setup for 5 minuteswhen in reality, it could have only been locked for a couple seconds This time. I guess you could always make that five minutes, down to like 10 seconds or so... George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Friday, March 23, 2012 12:23 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Record lock There is no way of which I know, in Universe natively, to figure out what time a lock was set. Years ago, I wrote a job that woke up every five minutes, scoured the lock table, and updated a lock table history file. Then at any time, you could query that history to how long a lock had been open or was yet open. So if this is a consistent problem, you might think of doing that. It doesn't really take a lot of effort, just make sure you test it well. -Original Message- From: Mecki Foerthmann mec...@gmx.net To: u2-users u2-users@listserver.u2ug.org Sent: Fri, Mar 23, 2012 1:08 am Subject: Re: [U2] Record lock I don't know about Universe but UniAdmin displays the time the lock was et in UD. On 23/03/2012 06:06, Namacha, N. (Nicholas) wrote: Is it possible to know for how long a record has been locked in universe? Kind Regards Nicholas Namacha Nedbank Limited Reg No 1951/09/06. The following link displays the names of the Nedbank Board of Directors and Company Secretary. [ http://www.nedbank.co.za/terms/DirectorsNedbank.htm ] This email is confidential and is intended for the addressee only. The following link will take you to Nedbank's legal notice. [ http://www.nedbank.co.za/terms/EmailDisclaimer.htm ] ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Record lock
Not possible. If you have *one* task that is setting and releasing the same lock constantly than yes. However that should be recognized as a problem and corrected anyway, except the slim possibility of a Batch Job Status flag lock itself. Otherwise, each process will have a unique process id and you must capture that as well. It's not enough to know that a lock has been set on a record, you have to know WHO set it. -Original Message- From: George Gallen ggal...@wyanokegroup.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Fri, Mar 23, 2012 9:38 am Subject: Re: [U2] Record lock Problem is if a lock was set multiple times within that 5 minute interval, it ould look like t had been setup for 5 minuteswhen in reality, it could have only been ocked for a couple seconds his time. I guess you could always make that five minutes, down to like 10 seconds or o... George -Original Message- rom: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] n Behalf Of Wjhonson ent: Friday, March 23, 2012 12:23 PM o: u2-users@listserver.u2ug.org ubject: Re: [U2] Record lock here is no way of which I know, in Universe natively, to figure out what time a ock was set. ears ago, I wrote a job that woke up every five minutes, scoured the lock able, and updated a lock table history file. hen at any time, you could query that history to how long a lock had been open r was yet open. o if this is a consistent problem, you might think of doing that. t doesn't really take a lot of effort, just make sure you test it well. -Original Message- rom: Mecki Foerthmann mec...@gmx.net o: u2-users u2-users@listserver.u2ug.org ent: Fri, Mar 23, 2012 1:08 am ubject: Re: [U2] Record lock don't know about Universe but UniAdmin displays the time the lock was t in UD. n 23/03/2012 06:06, Namacha, N. (Nicholas) wrote: Is it possible to know for how long a record has been locked in universe? Kind Regards Nicholas Namacha Nedbank Limited Reg No 1951/09/06. The following link displays the names of the Nedbank Board of Directors and Company Secretary. [ http://www.nedbank.co.za/terms/DirectorsNedbank.htm ] This email is confidential and is intended for the addressee only. The following link will take you to Nedbank's legal notice. [ http://www.nedbank.co.za/terms/EmailDisclaimer.htm ] ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Record lock
Not paying much attention to this thread so perhaps I missed something, but... That's not a problem, every application has code that does rapid lock/write/release operations on the same record. George's scenario was common and perfectly reasonable. T (And dude, you really need to do something about losing the first character of quoted words. Are you doing a physical copy/paste of text or something? Try a real email client. AOL Webmail is Not serving you well.) From: Wjhonson Not possible. If you have *one* task that is setting and releasing the same lock constantly than yes. However that should be recognized as a problem and corrected anyway, except the slim possibility of a Batch Job Status flag lock itself. From: George Gallen Problem is if a lock was set multiple times within that 5 minute interval, it ould look like t had been setup for 5 minuteswhen in reality, it could have only been ocked for a couple seconds his time. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Record lock
Your answer is not related to the main thrust of this thread. -Original Message- From: Tony Gravagno 3xk547...@sneakemail.com To: u2-users u2-users@listserver.u2ug.org Sent: Fri, Mar 23, 2012 11:11 am Subject: Re: [U2] Record lock Not paying much attention to this thread so perhaps I missed omething, but... That's not a problem, every application has code that does rapid ock/write/release operations on the same record. George's scenario as common and perfectly reasonable. (And dude, you really need to do something about losing the first haracter of quoted words. Are you doing a physical copy/paste of text r something? Try a real email client. AOL Webmail is Not serving you ell.) From: Wjhonson Not possible. If you have *one* task that is setting and releasing the same lock constantly than yes. However that should be recognized as a problem and corrected anyway, except the slim possibility of a Batch Job Status flag lock tself. From: George Gallen Problem is if a lock was set multiple times within that 5 minute nterval, it ould look like t had been setup for 5 minuteswhen in reality, t could have only been ocked for a couple seconds his time. ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Record lock
It is not relevant that there is *code* that does locking and releasing of the same item. It must be not just *code* but the exact same process ID that is doing this. This thread is not about exceptions. It is about how to tell how long a lock has been set for. You will always have exceptions. The OP needs a process that handles the 98 percent, not the 2 percent. -Original Message- From: Wjhonson wjhon...@aol.com To: u2-users u2-users@listserver.u2ug.org Sent: Fri, Mar 23, 2012 11:18 am Subject: Re: [U2] Record lock our answer is not related to the main thrust of this thread. Original Message- rom: Tony Gravagno 3xk547...@sneakemail.com o: u2-users u2-users@listserver.u2ug.org ent: Fri, Mar 23, 2012 11:11 am ubject: Re: [U2] Record lock ot paying much attention to this thread so perhaps I missed mething, but... hat's not a problem, every application has code that does rapid ck/write/release operations on the same record. George's scenario s common and perfectly reasonable. (And dude, you really need to do something about losing the first aracter of quoted words. Are you doing a physical copy/paste of text something? Try a real email client. AOL Webmail is Not serving you ll.) From: Wjhonson Not possible. If you have *one* task that is setting and releasing the same lock constantly than yes. However that should be recognized as a problem and corrected anyway, except the slim possibility of a Batch Job Status flag lock self. From: George Gallen Problem is if a lock was set multiple times within that 5 minute terval, it ould look like t had been setup for 5 minuteswhen in reality, could have only been ocked for a couple seconds his time. __ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Record lock
I whole-heartedly disagree... 1) I have numerous processes that lock/update/release the same record repeatedly running 24x7 - on the sale process id. 2) I don't want code that works 98% of the time - that's unacceptable. I don't want calls in the middle of the night because it appears processes are locked up when in fact they are running perfectly fine because some program fails 2% of the time. To this end, ALL READU's are wrapped inside of a subroutine that tracks blocking, time held, etc. Exceptions are a part of programming... Not dealing with the exceptions is bad programming practice. Would you not validate input because the user is expected to enter the right result 98% of the time, and the other 2% is ok? Years ago, we changed from a 5 digit numeric specimen id to 5 alpha/numeric... I sat in the pre-live meeting, and brought up the fact that words could be spelled. Words we might not want patients to see... With over 60 million possible permutations, the likelyhood was well under 2%. Would that have been an acceptable error rate to you? It's not to us. We excluded the vowels so words couldn't be spelled... That's programming for the exception. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Record lock
So you would recommend the OP modify their entire system of three thousand programs Instead of accept a 98% solution? Very nice. -Original Message- From: Robert Porter ropor...@ochsner.org To: u2-users u2-users@listserver.u2ug.org Sent: Fri, Mar 23, 2012 11:44 am Subject: Re: [U2] Record lock I whole-heartedly disagree... ) I have numerous processes that lock/update/release the same record repeatedly unning 24x7 - on the sale process id. ) I don't want code that works 98% of the time - that's unacceptable. I don't ant calls in the middle of the night because it appears processes are locked up hen in fact they are running perfectly fine because some program fails 2% of he time. o this end, ALL READU's are wrapped inside of a subroutine that tracks locking, time held, etc. xceptions are a part of programming... Not dealing with the exceptions is bad rogramming practice. Would you not validate input because the user is expected o enter the right result 98% of the time, and the other 2% is ok? ears ago, we changed from a 5 digit numeric specimen id to 5 alpha/numeric... I at in the pre-live meeting, and brought up the fact that words could be pelled. Words we might not want patients to see... With over 60 million ossible permutations, the likelyhood was well under 2%. Would that have been an cceptable error rate to you? It's not to us. We excluded the vowels so words ouldn't be spelled... That's programming for the exception. ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Record lock
Come on, people! Let's not get into another pissing contest of who programs the right way and who doesn't. As stated, the original question was if there is a way to tell how long a lock has been in place. Nothing else was given so the assumption that the OP was ONLY looking at locks placed programmatically is actually straying off topic. Without further information, specific to why they need the length of time a lock is in place, speculation of percentages or how to generate a timeline does not really seem to take anyone closer to really answering the original question. The only thing, so far, that I've seen that was a semi-direct answer is that maybe UniAdmin can provide the necessary information. Even at that, we don't know if the OP needs to just be able to find this out or if it's needed inside a program. Now is there a SYSTEM() value or maybe a LIST.READU option that provides this? THAT would be answers of value. climbing off soap box -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Robert Porter Sent: Friday, March 23, 2012 11:44 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Record lock I whole-heartedly disagree... 1) I have numerous processes that lock/update/release the same record repeatedly running 24x7 - on the sale process id. 2) I don't want code that works 98% of the time - that's unacceptable. I don't want calls in the middle of the night because it appears processes are locked up when in fact they are running perfectly fine because some program fails 2% of the time. To this end, ALL READU's are wrapped inside of a subroutine that tracks blocking, time held, etc. Exceptions are a part of programming... Not dealing with the exceptions is bad programming practice. Would you not validate input because the user is expected to enter the right result 98% of the time, and the other 2% is ok? Years ago, we changed from a 5 digit numeric specimen id to 5 alpha/numeric... I sat in the pre-live meeting, and brought up the fact that words could be spelled. Words we might not want patients to see... With over 60 million possible permutations, the likelyhood was well under 2%. Would that have been an acceptable error rate to you? It's not to us. We excluded the vowels so words couldn't be spelled... That's programming for the exception. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Record lock [irrelevant commentary]
*sigh* *putting the pop-corn back up* On 3/23/2012 3:00 PM, Woodward, Bob wrote: Come on, people! Let's not get into another pissing contest of who programs the right way and who doesn't. As stated, the original question was if there is a way to tell how long a lock has been in place. Nothing else was given so the assumption that the OP was ONLY looking at locks placed programmatically is actually straying off topic. Without further information, specific to why they need the length of time a lock is in place, speculation of percentages or how to generate a timeline does not really seem to take anyone closer to really answering the original question. The only thing, so far, that I've seen that was a semi-direct answer is that maybe UniAdmin can provide the necessary information. Even at that, we don't know if the OP needs to just be able to find this out or if it's needed inside a program. Now is there a SYSTEM() value or maybe a LIST.READU option that provides this? THAT would be answers of value. climbing off soap box -- Glen Batchelor IT Director/CIO/CTO All-Spec Industries phone: (910) 332-0424 fax: (910) 763-5664 E-mail: webmas...@all-spec.com Web: http://www.all-spec.com Blog: http://blog.all-spec.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Record lock
There is not, on Universe natively, any value that tells you how long a lock has been placed. I answered that in the first response. You have to roll your own. -Original Message- From: Woodward, Bob bob_woodw...@k2sports.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Fri, Mar 23, 2012 12:01 pm Subject: Re: [U2] Record lock Come on, people! Let's not get into another pissing contest of who rograms the right way and who doesn't. As stated, the original uestion was if there is a way to tell how long a lock has been in lace. Nothing else was given so the assumption that the OP was ONLY ooking at locks placed programmatically is actually straying off topic. ithout further information, specific to why they need the length of ime a lock is in place, speculation of percentages or how to generate a imeline does not really seem to take anyone closer to really answering he original question. The only thing, so far, that I've seen that was semi-direct answer is that maybe UniAdmin can provide the necessary nformation. Even at that, we don't know if the OP needs to just be ble to find this out or if it's needed inside a program. Now is there a SYSTEM() value or maybe a LIST.READU option that provides his? THAT would be answers of value. climbing off soap box -Original Message- rom: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Robert Porter ent: Friday, March 23, 2012 11:44 AM o: u2-users@listserver.u2ug.org ubject: Re: [U2] Record lock I whole-heartedly disagree... ) I have numerous processes that lock/update/release the same record epeatedly running 24x7 - on the sale process id. ) I don't want code that works 98% of the time - that's unacceptable. don't want calls in the middle of the night because it appears rocesses are locked up when in fact they are running perfectly fine ecause some program fails 2% of the time. o this end, ALL READU's are wrapped inside of a subroutine that tracks locking, time held, etc. xceptions are a part of programming... Not dealing with the exceptions s bad programming practice. Would you not validate input because the ser is expected to enter the right result 98% of the time, and the ther 2% is ok? ears ago, we changed from a 5 digit numeric specimen id to 5 lpha/numeric... I sat in the pre-live meeting, and brought up the fact hat words could be spelled. Words we might not want patients to see... ith over 60 million possible permutations, the likelyhood was well nder 2%. Would that have been an acceptable error rate to you? It's ot to us. We excluded the vowels so words couldn't be spelled... That's rogramming for the exception. __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] Record Lock Outside of Transaction
I am retrofitting an application which today looks something like this... BEGIN TRANSACTION READU REC FROM F.FILE, ITEM.ID THEN REC = DATE() WRITE REC ON F.FILE, ITEM.ID THEN COMMIT END ELSE RELEASE END END ELSE ROLLBACK END END TRANSACTION Changes require the lock be acquired prior to the BEGIN TRANSACTION... READU REC FROM F.FILE, ITEM.ID THEN BEGIN TRANSACTION REC = DATE() WRITE REC ON F.FILE, ITEM.ID THEN COMMIT END ELSE ROLLBACK END END TRANSACTION END ELSE RELEASE F.FILE, ITEM.ID END Are there any negative consequences of doing so? Thanks. Perry Taylor Zirmed, Inc. Perry Taylor Office (877) 494-7633 ext. 4392 Direct (502) 779-4392 Zirmed, Inc. 626 West Main St., 6th Floor Louisville, KY 40202 www.zirmed.com CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. ZirMed, Inc. has strict policies regarding the content of e-mail communications, specifically Protected Health Information, any communications containing such material will be returned to the originating party with such advisement noted. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/