Apr 22: How to induce log file sync waits
Trackbacks
Trackback specific URI for this entry
No Trackbacks
PROCEDURE RL_addLock ( lockEntity IN d000m.lock_entity_no%TYPE, lockEntityKey IN d000m.lock_entity_key%TYPE, lockProfileId IN d000m.lock_profile_id%TYPE, lockSessionNo IN d000m.lock_session_no%TYPE, lockOperatorId IN d000m.lock_operator_id%TYPE, lockTaskId IN d000m.lock_task_id%TYPE, lockDate IN d000m.lock_date%TYPE, lockTime IN d000m.lock_time%TYPE ) IS PRAGMA AUTONOMOUS_TRANSACTION; BEGIN INSERT INTO d000m VALUES (lockEntity, lockEntityKey, lockProfileId, lockSessionNo, lockOperatorId, lockTaskId, lockDate, lockTime ); COMMIT; EXCEPTION WHEN DUP_VAL_ON_INDEX THEN BEGIN ROLLBACK; END; END; / PROCEDURE RL_delLock ( lockEntity IN d000m.lock_entity_no%TYPE, lockEntityKey IN d000m.lock_entity_key%TYPE, lockProfileId IN d000m.lock_profile_id%TYPE, lockSessionNo IN d000m.lock_session_no%TYPE ) IS PRAGMA AUTONOMOUS_TRANSACTION; BEGIN DELETE FROM d000m WHERE lock_entity_no = lockEntity AND lock_entity_key = lockEntityKey AND lock_profile_id = lockProfileId AND lock_session_no = lockSessionNo; COMMIT; EXCEPTION WHEN NO_DATA_FOUND THEN BEGIN ROLLBACK; END; END; /
#1 - Niall Litchfield said:
2009-04-22 06:55 - (Reply)
I particularly like the exception handling - is it just me or does it just scream "I ran into a concurrency issue that I hadn't thought about, oh well lets just pretend it never happened"
still, if the developer was writing their own locking mechanism then by definition they want to induce scalability restrictions (to protect integrity) and voila they have. all that's needed now is the report back "all functioning as intended, please can I have my money now?"
sorry I've seen too much of this, and using built in locking is always "too complicated and too much of an overhead" when it's taken to the developer.
Niall
#2 - Doug Burns said:
2009-04-22 08:31 - (Reply)
sorry I've seen too much of this, and using built in locking is always "too complicated and too much of an overhead" when it's taken to the developer.
Agreed, and that's why I posted it.
It's far too easy to go around pointing the finger but I feel I'm destined to spend the rest of my 'career' seeing the same old things cause the same old problems.
Contents
Part 1 - Default options - GLOBAL AND PARTITION
Part 2 - Estimated Global Stats
Part 3 - Stats Aggregation Problems I
Part 4 - Stats Aggregation Problems II
Part 5 - Minimal Stats Aggregation
Part 6a - COPY_TABLE_STATS - Intro
Part 6b - COPY_TABLE_STATS - Mistakes
Part 6c - COPY_TABLE_STATS - Bugs and Patches
Part 6d - COPY_TABLE_STATS - A Light-bulb Moment
Part 6e - COPY_TABLE_STATS - Bug 10268597
11g
ACE
adaptive thresholds
ASH
Audit Vault
AWR
Blogging
conferences
Cuddly Toys
Database Refresh
DBMS_STATS
Direct Path Reads
Fun
grid control
hotsos 2010
listener
Locking
oow
oow2009
optimiser
OTN
Parallel
Partitions
Patching
swingbench
The Reality Gap
time matters
ukoug
ukoug2009
Unix/Shell
Useful LinksDesign by Andreas Viklund | Conversion to s9y by Carl