{"action":"created","issue":{"url":"https://api.github.com/repos/Islandora/islandora/issues/640","labels_url":"https://api.github.com/repos/Islandora/islandora/issues/640/labels{/name}","comments_url":"https://api.github.com/repos/Islandora/islandora/issues/640/comments","events_url":"https://api.github.com/repos/Islandora/islandora/issues/640/events","html_url":"https://github.com/Islandora/islandora/pull/640","id":119777851,"number":640,"title":"Optionaly using semaphores on APIM.","user":{"login":"willtp87","id":688918,"avatar_url":"https://avatars.githubusercontent.com/u/688918?v=3","gravatar_id":"","url":"https://api.github.com/users/willtp87","html_url":"https://github.com/willtp87","followers_url":"https://api.github.com/users/willtp87/followers","following_url":"https://api.github.com/users/willtp87/following{/other_user}","gists_url":"https://api.github.com/users/willtp87/gists{/gist_id}","starred_url":"https://api.github.com/users/willtp87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willtp87/subscriptions","organizations_url":"https://api.github.com/users/willtp87/orgs","repos_url":"https://api.github.com/users/willtp87/repos","events_url":"https://api.github.com/users/willtp87/events{/privacy}","received_events_url":"https://api.github.com/users/willtp87/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-01T18:24:35Z","updated_at":"2015-12-05T11:35:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Islandora/islandora/pulls/640","html_url":"https://github.com/Islandora/islandora/pull/640","diff_url":"https://github.com/Islandora/islandora/pull/640.diff","patch_url":"https://github.com/Islandora/islandora/pull/640.patch"},"body":"**Jira:** [ISLANDORA-1556](https://jira.duraspace.org/browse/ISLANDORA-1556)\r\n\r\n# What does this Pull Request do?\r\nThe purpose of this pull request is to configurably take over as much control of object concurrency as possible as Fedora has some issues with this.\r\nThe pull request is using Drupal semaphores as they are quite powerful and already available.\r\n\r\n\r\n# How should this be tested?\r\nThis is difficult to test but there are many ways to cause the issue.  One must set up a situation where Islandora is modifying the same object from two different processes. Without this feature enabled there will be intermittent and inconsistent issues in Fedora.  After this change these should be greatly reduced.\r\nPlease see [ISLANDORA-1556](https://jira.duraspace.org/browse/ISLANDORA-1556) for some examples.\r\n\r\n\r\n# Background context:\r\nThis is a general issue but has become more pressing as some installations have increased their levels of concurrency using [Islandora Job](https://github.com/discoverygarden/islandora_job).\r\n\r\n\r\n# Additional Notes:\r\n* **Could this change impact execution of existing code?**\r\nIf the feature is enabled there will be a slow down when editing objects, but Islandora will be more stable when more than one process is editing the same object.\r\n\r\n\r\n----\r\nWilliam Panting\r\n_Developer_\r\n**[discoverygarden inc.](http://www.discoverygarden.ca) | Managing Digital Content**"},"comment":{"url":"https://api.github.com/repos/Islandora/islandora/issues/comments/162174821","html_url":"https://github.com/Islandora/islandora/pull/640#issuecomment-162174821","issue_url":"https://api.github.com/repos/Islandora/islandora/issues/640","id":162174821,"user":{"login":"rosiel","id":1943338,"avatar_url":"https://avatars.githubusercontent.com/u/1943338?v=3","gravatar_id":"","url":"https://api.github.com/users/rosiel","html_url":"https://github.com/rosiel","followers_url":"https://api.github.com/users/rosiel/followers","following_url":"https://api.github.com/users/rosiel/following{/other_user}","gists_url":"https://api.github.com/users/rosiel/gists{/gist_id}","starred_url":"https://api.github.com/users/rosiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosiel/subscriptions","organizations_url":"https://api.github.com/users/rosiel/orgs","repos_url":"https://api.github.com/users/rosiel/repos","events_url":"https://api.github.com/users/rosiel/events{/privacy}","received_events_url":"https://api.github.com/users/rosiel/received_events","type":"User","site_admin":false},"created_at":"2015-12-05T11:35:23Z","updated_at":"2015-12-05T11:35:23Z","body":"Can I propose verbiage? \"Lock objects during modification\" and \"Maximum lock duration\" as your #titles, and \"Time in seconds before the lock expires\" for the #description are a bit more clear. \r\n\r\nI also can't figure out how to test a collision. Using Devel's Execute PHP Code, I could make a lock, but it expired when that process returned. If I sleep() the process, nothing else can execute. \r\n\r\nSo for those who read code better than I can, in the case of a conflict, is \"//Waiting forever\" what actually happens, and is that what you want?\r\n\r\n\r\n"}}