dmwm/T0 — pull request #4022 by hufnagel (2012-12-17 20:51:21+00:00)
Title: fix a race condition in some insert queries

Both the Tier0Injector from the P5 transfer system and the Tier0Feeder WMAT0 components insert into the cmssw_version, stream and lumi_section tables, potentially the same values at the same time. A simple 'INSERT ... WHERE NOT EXISTS...' statement has turned out not to be sufficient because both 'WHERE NOT EXISTS' clauses can run at the same time, both returning a 'NOT EXISTS' and then both inserts are attempted, with one for them throwing an Oracle exception. Wrap these calls into another layer of Oracle exception handling (catching and ignoring an insert on duplicate exception).