{"action":"created","issue":{"url":"https://api.github.com/repos/dmwm/WMCore/issues/6383","labels_url":"https://api.github.com/repos/dmwm/WMCore/issues/6383/labels{/name}","comments_url":"https://api.github.com/repos/dmwm/WMCore/issues/6383/comments","events_url":"https://api.github.com/repos/dmwm/WMCore/issues/6383/events","html_url":"https://github.com/dmwm/WMCore/pull/6383","id":115278292,"number":6383,"title":"dbsbuffer changes to work around race condition between dbs and phedex updates","user":{"login":"hufnagel","id":1798355,"avatar_url":"https://avatars.githubusercontent.com/u/1798355?v=3","gravatar_id":"","url":"https://api.github.com/users/hufnagel","html_url":"https://github.com/hufnagel","followers_url":"https://api.github.com/users/hufnagel/followers","following_url":"https://api.github.com/users/hufnagel/following{/other_user}","gists_url":"https://api.github.com/users/hufnagel/gists{/gist_id}","starred_url":"https://api.github.com/users/hufnagel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hufnagel/subscriptions","organizations_url":"https://api.github.com/users/hufnagel/orgs","repos_url":"https://api.github.com/users/hufnagel/repos","events_url":"https://api.github.com/users/hufnagel/events{/privacy}","received_events_url":"https://api.github.com/users/hufnagel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-11-05T12:57:25Z","updated_at":"2015-11-09T15:50:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dmwm/WMCore/pulls/6383","html_url":"https://github.com/dmwm/WMCore/pull/6383","diff_url":"https://github.com/dmwm/WMCore/pull/6383.diff","patch_url":"https://github.com/dmwm/WMCore/pull/6383.patch"},"body":"Both PhEDExInjector and DBS3Buffer components update dbsbuffer_file records. They do it in a way that the two updates can deadlock each other. General slow performance of dbsbuffer related code makes this quite likely to happen, therefor rework and simplify the schema (add some indexes, remove triggers, general cleanup).\r\n\r\nNo functional changes and the cleanup and indexes are only done on Oracle for now as some of it is very Oracle specific. We could sync the MySQL version later if so desired.\r\n\r\nAlso put in recovery logic to at least retry once in each component if deadlock occurs."},"comment":{"url":"https://api.github.com/repos/dmwm/WMCore/issues/comments/155102079","html_url":"https://github.com/dmwm/WMCore/pull/6383#issuecomment-155102079","issue_url":"https://api.github.com/repos/dmwm/WMCore/issues/6383","id":155102079,"user":{"login":"hufnagel","id":1798355,"avatar_url":"https://avatars.githubusercontent.com/u/1798355?v=3","gravatar_id":"","url":"https://api.github.com/users/hufnagel","html_url":"https://github.com/hufnagel","followers_url":"https://api.github.com/users/hufnagel/followers","following_url":"https://api.github.com/users/hufnagel/following{/other_user}","gists_url":"https://api.github.com/users/hufnagel/gists{/gist_id}","starred_url":"https://api.github.com/users/hufnagel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hufnagel/subscriptions","organizations_url":"https://api.github.com/users/hufnagel/orgs","repos_url":"https://api.github.com/users/hufnagel/repos","events_url":"https://api.github.com/users/hufnagel/events{/privacy}","received_events_url":"https://api.github.com/users/hufnagel/received_events","type":"User","site_admin":false},"created_at":"2015-11-09T15:50:57Z","updated_at":"2015-11-09T15:50:57Z","body":"@amaltaro , please review. MySQL changes are in and they also triggered some minor changes in the Oracle schema to get them in sync. Basically primary keys and unique constraints are always defined in the CREATE TABLE statement itself, any FK constraint was moved out to the separate ALTER TABLE statement. I did the latter because if you have the FK constraints in the table definition then you become sensitive to the order you create tables at (as they depend on each other).\r\n\r\nAdded all the new Oracle indexes also to MySQL."}}