{"action":"created","issue":{"url":"https://api.github.com/repos/Intel-bigdata/OAP/issues/435","repository_url":"https://api.github.com/repos/Intel-bigdata/OAP","labels_url":"https://api.github.com/repos/Intel-bigdata/OAP/issues/435/labels{/name}","comments_url":"https://api.github.com/repos/Intel-bigdata/OAP/issues/435/comments","events_url":"https://api.github.com/repos/Intel-bigdata/OAP/issues/435/events","html_url":"https://github.com/Intel-bigdata/OAP/pull/435","id":277979832,"number":435,"title":"[DO NOT MERGE] Draft patch for Cache lock mechanism","user":{"login":"linhong-intel","id":23625649,"avatar_url":"https://avatars2.githubusercontent.com/u/23625649?v=4","gravatar_id":"","url":"https://api.github.com/users/linhong-intel","html_url":"https://github.com/linhong-intel","followers_url":"https://api.github.com/users/linhong-intel/followers","following_url":"https://api.github.com/users/linhong-intel/following{/other_user}","gists_url":"https://api.github.com/users/linhong-intel/gists{/gist_id}","starred_url":"https://api.github.com/users/linhong-intel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linhong-intel/subscriptions","organizations_url":"https://api.github.com/users/linhong-intel/orgs","repos_url":"https://api.github.com/users/linhong-intel/repos","events_url":"https://api.github.com/users/linhong-intel/events{/privacy}","received_events_url":"https://api.github.com/users/linhong-intel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-30T02:47:14Z","updated_at":"2017-12-04T01:41:21Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/Intel-bigdata/OAP/pulls/435","html_url":"https://github.com/Intel-bigdata/OAP/pull/435","diff_url":"https://github.com/Intel-bigdata/OAP/pull/435.diff","patch_url":"https://github.com/Intel-bigdata/OAP/pull/435.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\n1. Add a OapEnv for Oap initialize\r\n2. Use Java's read write lock, to secure in-used cache not be freed\r\n    2.1 hold a read lock before reading FiberCache (done in FiberCacheManager.get)\r\n    2.2 Try to hold write lock in onRemove notify. if can't acquire, put cache back to Cache Manager\r\n    2.3 create a dummy MemoryBlock without allocating memory when put into CacheManager\r\n        -- 2.3.1 if put into cache success, hold read lock, allocate memory and load data\r\n        -- 2.3.2 if put into cache fail, do nothing and return null to indicate no enough memory\r\n\r\n## How was this patch tested?\r\n\r\nUnit test pass\r\n"},"comment":{"url":"https://api.github.com/repos/Intel-bigdata/OAP/issues/comments/348839486","html_url":"https://github.com/Intel-bigdata/OAP/pull/435#issuecomment-348839486","issue_url":"https://api.github.com/repos/Intel-bigdata/OAP/issues/435","id":348839486,"user":{"login":"linhong-intel","id":23625649,"avatar_url":"https://avatars2.githubusercontent.com/u/23625649?v=4","gravatar_id":"","url":"https://api.github.com/users/linhong-intel","html_url":"https://github.com/linhong-intel","followers_url":"https://api.github.com/users/linhong-intel/followers","following_url":"https://api.github.com/users/linhong-intel/following{/other_user}","gists_url":"https://api.github.com/users/linhong-intel/gists{/gist_id}","starred_url":"https://api.github.com/users/linhong-intel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linhong-intel/subscriptions","organizations_url":"https://api.github.com/users/linhong-intel/orgs","repos_url":"https://api.github.com/users/linhong-intel/repos","events_url":"https://api.github.com/users/linhong-intel/events{/privacy}","received_events_url":"https://api.github.com/users/linhong-intel/received_events","type":"User","site_admin":false},"created_at":"2017-12-04T01:41:21Z","updated_at":"2017-12-04T01:41:21Z","author_association":"MEMBER","body":"@chenghao-intel \r\nCan you review the second commit in this PR? https://github.com/Intel-bigdata/OAP/pull/435/commits/08a7033fd07caf837a291c2103b5f90b4cad32c7\r\nLet's first check if this implementation is acceptable or not."}}
{"actor":{"display_login":"linhong-intel"}}