{"action":"created","issue":{"url":"https://api.github.com/repos/sonatype/nexus-oss/issues/1171","labels_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/1171/labels{/name}","comments_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/1171/comments","events_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/1171/events","html_url":"https://github.com/sonatype/nexus-oss/pull/1171","id":67338146,"number":1171,"title":"NEXUS-8435: Alternate approach to fix StorageFacet container contention","user":{"login":"cstamas","id":45165,"avatar_url":"https://avatars.githubusercontent.com/u/45165?v=3","gravatar_id":"","url":"https://api.github.com/users/cstamas","html_url":"https://github.com/cstamas","followers_url":"https://api.github.com/users/cstamas/followers","following_url":"https://api.github.com/users/cstamas/following{/other_user}","gists_url":"https://api.github.com/users/cstamas/gists{/gist_id}","starred_url":"https://api.github.com/users/cstamas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cstamas/subscriptions","organizations_url":"https://api.github.com/users/cstamas/orgs","repos_url":"https://api.github.com/users/cstamas/repos","events_url":"https://api.github.com/users/cstamas/events{/privacy}","received_events_url":"https://api.github.com/users/cstamas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sonatype/nexus-oss/labels/poc","name":"poc","color":"eb6420"},{"url":"https://api.github.com/repos/sonatype/nexus-oss/labels/review","name":"review","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-09T11:10:27Z","updated_at":"2015-04-09T17:59:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sonatype/nexus-oss/pulls/1171","html_url":"https://github.com/sonatype/nexus-oss/pull/1171","diff_url":"https://github.com/sonatype/nexus-oss/pull/1171.diff","patch_url":"https://github.com/sonatype/nexus-oss/pull/1171.patch"},"body":"Changes:\r\n* Blob-fix: Similar to PR https://github.com/sonatype/nexus-oss/pull/1137 but retains blob automatic cleanup. Makes possible to stream HTTP response without touching (and hence, starting implicitly TX) OrientDB entities. No need to load up anything from DB, and risk MVCC version becomes stale during streaming, see MavenFacetImpl.\r\n* Bucket-contention fix: Handles assets and components as before, but defers link creation with logic to retry, happens seamlessly w/o caller noticing anything. This makes bucket contention window very small, and handled in a manner proposed by Orient folks: by retrying the Tx (but only of the link creation).\r\n* in worst case, this code will leave components and assets \"orphans\" (w/o owning bucket), and those should be GCed in very same way as we handle \"orphan\" Blobs. Also, they are not getting in a way of existing code, as all READ ops always start with a Bucket having edge to asset or component.\r\n* if caller gets OConcurrentModificationEx, caller it the one that should behave as appropriate for his use case. He can get it due to a) concurrent modification of asset or component on his behalf, or b) inability to create links. In both cases, the failed Tx may leave orphan assets and components, that should be GCed.\r\n\r\nTested with Maven repositories."},"comment":{"url":"https://api.github.com/repos/sonatype/nexus-oss/issues/comments/91311466","html_url":"https://github.com/sonatype/nexus-oss/pull/1171#issuecomment-91311466","issue_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/1171","id":91311466,"user":{"login":"jdillon","id":20114,"avatar_url":"https://avatars.githubusercontent.com/u/20114?v=3","gravatar_id":"","url":"https://api.github.com/users/jdillon","html_url":"https://github.com/jdillon","followers_url":"https://api.github.com/users/jdillon/followers","following_url":"https://api.github.com/users/jdillon/following{/other_user}","gists_url":"https://api.github.com/users/jdillon/gists{/gist_id}","starred_url":"https://api.github.com/users/jdillon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdillon/subscriptions","organizations_url":"https://api.github.com/users/jdillon/orgs","repos_url":"https://api.github.com/users/jdillon/repos","events_url":"https://api.github.com/users/jdillon/events{/privacy}","received_events_url":"https://api.github.com/users/jdillon/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T17:59:05Z","updated_at":"2015-04-09T17:59:05Z","body":"-1, thought we had a solid recommendation to move to document api, unsure why we are now dancing around this."}}