{"action":"created","comment":{"url":"https://api.github.com/repos/igniterealtime/Openfire/pulls/comments/83868564","pull_request_review_id":4682334,"id":83868564,"diff_hunk":"@@ -86,11 +97,9 @@ public PrivacyListProvider() {\n \n         // Load the total number of privacy lists in the database. We're looking\n         // for the (very common) special case that there are no privacy lists stored.\n-        // In that case, we can optimize away many database calls. In the future, a\n-        // better general-case solution may be to cache all privacy lists defined\n-        // if there are less than, say, 500.\n-        privacyListCount = new AtomicInteger(0);\n-        loadPrivacyListCount();\n+        // In that case, we can optimize away many database calls. \n+        privacyListNotUsed = new AtomicBoolean(true);","path":"src/java/org/jivesoftware/openfire/privacy/PrivacyListProvider.java","position":43,"original_position":43,"commit_id":"3e747fd36dd951ecba7981e3cb9e12d84590090e","original_commit_id":"3e747fd36dd951ecba7981e3cb9e12d84590090e","user":{"login":"guusdk","id":4253898,"avatar_url":"https://avatars.githubusercontent.com/u/4253898?v=3","gravatar_id":"","url":"https://api.github.com/users/guusdk","html_url":"https://github.com/guusdk","followers_url":"https://api.github.com/users/guusdk/followers","following_url":"https://api.github.com/users/guusdk/following{/other_user}","gists_url":"https://api.github.com/users/guusdk/gists{/gist_id}","starred_url":"https://api.github.com/users/guusdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guusdk/subscriptions","organizations_url":"https://api.github.com/users/guusdk/orgs","repos_url":"https://api.github.com/users/guusdk/repos","events_url":"https://api.github.com/users/guusdk/events{/privacy}","received_events_url":"https://api.github.com/users/guusdk/received_events","type":"User","site_admin":false},"body":"Holy double negation, Batman! It's probably easier to name this \"databaseContainsPrivacyLists\", which is what we check for. Also, the comment above this line refers to a 'number', which is no longer the case.","created_at":"2016-10-18T14:37:41Z","updated_at":"2016-10-18T14:37:59Z","html_url":"https://github.com/igniterealtime/Openfire/pull/656#discussion_r83868564","pull_request_url":"https://api.github.com/repos/igniterealtime/Openfire/pulls/656","_links":{"self":{"href":"https://api.github.com/repos/igniterealtime/Openfire/pulls/comments/83868564"},"html":{"href":"https://github.com/igniterealtime/Openfire/pull/656#discussion_r83868564"},"pull_request":{"href":"https://api.github.com/repos/igniterealtime/Openfire/pulls/656"}}},"pull_request":{"url":"https://api.github.com/repos/igniterealtime/Openfire/pulls/656","id":89815872,"html_url":"https://github.com/igniterealtime/Openfire/pull/656","diff_url":"https://github.com/igniterealtime/Openfire/pull/656.diff","patch_url":"https://github.com/igniterealtime/Openfire/pull/656.patch","issue_url":"https://api.github.com/repos/igniterealtime/Openfire/issues/656","number":656,"state":"open","locked":false,"title":"OF-1206: PrivacyLists on first run","user":{"login":"Gugli","id":2990145,"avatar_url":"https://avatars.githubusercontent.com/u/2990145?v=3","gravatar_id":"","url":"https://api.github.com/users/Gugli","html_url":"https://github.com/Gugli","followers_url":"https://api.github.com/users/Gugli/followers","following_url":"https://api.github.com/users/Gugli/following{/other_user}","gists_url":"https://api.github.com/users/Gugli/gists{/gist_id}","starred_url":"https://api.github.com/users/Gugli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gugli/subscriptions","organizations_url":"https://api.github.com/users/Gugli/orgs","repos_url":"https://api.github.com/users/Gugli/repos","events_url":"https://api.github.com/users/Gugli/events{/privacy}","received_events_url":"https://api.github.com/users/Gugli/received_events","type":"User","site_admin":false},"body":"From [here](https://community.igniterealtime.org/thread/59616)\r\n\r\nThere are 2 instances of PrivacyListProvider (one in PrivacyListManager and the other in IQPrivacyHandler)\r\n\r\nThe issue was : both instances have separate privacyListCount variables, which are filled during PrivacyListProvider constructor (== server startup).\r\nThus, if at server startup the privacyListCount is 0, and one of the instances adds a PrivacyList, the other will never be informed and discard all changes and reads.\r\n\r\nFix : make privacyListCount static.","created_at":"2016-10-18T13:33:24Z","updated_at":"2016-10-18T14:37:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"025080dd7971a29046e47132e1babb7585ccc9d3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/igniterealtime/Openfire/pulls/656/commits","review_comments_url":"https://api.github.com/repos/igniterealtime/Openfire/pulls/656/comments","review_comment_url":"https://api.github.com/repos/igniterealtime/Openfire/pulls/comments{/number}","comments_url":"https://api.github.com/repos/igniterealtime/Openfire/issues/656/comments","statuses_url":"https://api.github.com/repos/igniterealtime/Openfire/statuses/3e747fd36dd951ecba7981e3cb9e12d84590090e","head":{"label":"Gugli:PrivacyListsFirstRun","ref":"PrivacyListsFirstRun","sha":"3e747fd36dd951ecba7981e3cb9e12d84590090e","user":{"login":"Gugli","id":2990145,"avatar_url":"https://avatars.githubusercontent.com/u/2990145?v=3","gravatar_id":"","url":"https://api.github.com/users/Gugli","html_url":"https://github.com/Gugli","followers_url":"https://api.github.com/users/Gugli/followers","following_url":"https://api.github.com/users/Gugli/following{/other_user}","gists_url":"https://api.github.com/users/Gugli/gists{/gist_id}","starred_url":"https://api.github.com/users/Gugli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gugli/subscriptions","organizations_url":"https://api.github.com/users/Gugli/orgs","repos_url":"https://api.github.com/users/Gugli/repos","events_url":"https://api.github.com/users/Gugli/events{/privacy}","received_events_url":"https://api.github.com/users/Gugli/received_events","type":"User","site_admin":false},"repo":{"id":70062079,"name":"Openfire","full_name":"Gugli/Openfire","owner":{"login":"Gugli","id":2990145,"avatar_url":"https://avatars.githubusercontent.com/u/2990145?v=3","gravatar_id":"","url":"https://api.github.com/users/Gugli","html_url":"https://github.com/Gugli","followers_url":"https://api.github.com/users/Gugli/followers","following_url":"https://api.github.com/users/Gugli/following{/other_user}","gists_url":"https://api.github.com/users/Gugli/gists{/gist_id}","starred_url":"https://api.github.com/users/Gugli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gugli/subscriptions","organizations_url":"https://api.github.com/users/Gugli/orgs","repos_url":"https://api.github.com/users/Gugli/repos","events_url":"https://api.github.com/users/Gugli/events{/privacy}","received_events_url":"https://api.github.com/users/Gugli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Gugli/Openfire","description":"A XMPP server licensed under the Open Source Apache License.","fork":true,"url":"https://api.github.com/repos/Gugli/Openfire","forks_url":"https://api.github.com/repos/Gugli/Openfire/forks","keys_url":"https://api.github.com/repos/Gugli/Openfire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gugli/Openfire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gugli/Openfire/teams","hooks_url":"https://api.github.com/repos/Gugli/Openfire/hooks","issue_events_url":"https://api.github.com/repos/Gugli/Openfire/issues/events{/number}","events_url":"https://api.github.com/repos/Gugli/Openfire/events","assignees_url":"https://api.github.com/repos/Gugli/Openfire/assignees{/user}","branches_url":"https://api.github.com/repos/Gugli/Openfire/branches{/branch}","tags_url":"https://api.github.com/repos/Gugli/Openfire/tags","blobs_url":"https://api.github.com/repos/Gugli/Openfire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gugli/Openfire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gugli/Openfire/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gugli/Openfire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gugli/Openfire/statuses/{sha}","languages_url":"https://api.github.com/repos/Gugli/Openfire/languages","stargazers_url":"https://api.github.com/repos/Gugli/Openfire/stargazers","contributors_url":"https://api.github.com/repos/Gugli/Openfire/contributors","subscribers_url":"https://api.github.com/repos/Gugli/Openfire/subscribers","subscription_url":"https://api.github.com/repos/Gugli/Openfire/subscription","commits_url":"https://api.github.com/repos/Gugli/Openfire/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gugli/Openfire/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gugli/Openfire/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gugli/Openfire/issues/comments{/number}","contents_url":"https://api.github.com/repos/Gugli/Openfire/contents/{+path}","compare_url":"https://api.github.com/repos/Gugli/Openfire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gugli/Openfire/merges","archive_url":"https://api.github.com/repos/Gugli/Openfire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gugli/Openfire/downloads","issues_url":"https://api.github.com/repos/Gugli/Openfire/issues{/number}","pulls_url":"https://api.github.com/repos/Gugli/Openfire/pulls{/number}","milestones_url":"https://api.github.com/repos/Gugli/Openfire/milestones{/number}","notifications_url":"https://api.github.com/repos/Gugli/Openfire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gugli/Openfire/labels{/name}","releases_url":"https://api.github.com/repos/Gugli/Openfire/releases{/id}","deployments_url":"https://api.github.com/repos/Gugli/Openfire/deployments","created_at":"2016-10-05T13:16:23Z","updated_at":"2016-10-05T13:16:34Z","pushed_at":"2016-10-18T14:06:20Z","git_url":"git://github.com/Gugli/Openfire.git","ssh_url":"git@github.com:Gugli/Openfire.git","clone_url":"https://github.com/Gugli/Openfire.git","svn_url":"https://github.com/Gugli/Openfire","homepage":null,"size":816397,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"igniterealtime:master","ref":"master","sha":"2638e753c69fbe63703644172d560382cf89c97d","user":{"login":"igniterealtime","id":5991032,"avatar_url":"https://avatars.githubusercontent.com/u/5991032?v=3","gravatar_id":"","url":"https://api.github.com/users/igniterealtime","html_url":"https://github.com/igniterealtime","followers_url":"https://api.github.com/users/igniterealtime/followers","following_url":"https://api.github.com/users/igniterealtime/following{/other_user}","gists_url":"https://api.github.com/users/igniterealtime/gists{/gist_id}","starred_url":"https://api.github.com/users/igniterealtime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igniterealtime/subscriptions","organizations_url":"https://api.github.com/users/igniterealtime/orgs","repos_url":"https://api.github.com/users/igniterealtime/repos","events_url":"https://api.github.com/users/igniterealtime/events{/privacy}","received_events_url":"https://api.github.com/users/igniterealtime/received_events","type":"Organization","site_admin":false},"repo":{"id":18511687,"name":"Openfire","full_name":"igniterealtime/Openfire","owner":{"login":"igniterealtime","id":5991032,"avatar_url":"https://avatars.githubusercontent.com/u/5991032?v=3","gravatar_id":"","url":"https://api.github.com/users/igniterealtime","html_url":"https://github.com/igniterealtime","followers_url":"https://api.github.com/users/igniterealtime/followers","following_url":"https://api.github.com/users/igniterealtime/following{/other_user}","gists_url":"https://api.github.com/users/igniterealtime/gists{/gist_id}","starred_url":"https://api.github.com/users/igniterealtime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igniterealtime/subscriptions","organizations_url":"https://api.github.com/users/igniterealtime/orgs","repos_url":"https://api.github.com/users/igniterealtime/repos","events_url":"https://api.github.com/users/igniterealtime/events{/privacy}","received_events_url":"https://api.github.com/users/igniterealtime/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/igniterealtime/Openfire","description":"A XMPP server licensed under the Open Source Apache License.","fork":false,"url":"https://api.github.com/repos/igniterealtime/Openfire","forks_url":"https://api.github.com/repos/igniterealtime/Openfire/forks","keys_url":"https://api.github.com/repos/igniterealtime/Openfire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/igniterealtime/Openfire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/igniterealtime/Openfire/teams","hooks_url":"https://api.github.com/repos/igniterealtime/Openfire/hooks","issue_events_url":"https://api.github.com/repos/igniterealtime/Openfire/issues/events{/number}","events_url":"https://api.github.com/repos/igniterealtime/Openfire/events","assignees_url":"https://api.github.com/repos/igniterealtime/Openfire/assignees{/user}","branches_url":"https://api.github.com/repos/igniterealtime/Openfire/branches{/branch}","tags_url":"https://api.github.com/repos/igniterealtime/Openfire/tags","blobs_url":"https://api.github.com/repos/igniterealtime/Openfire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/igniterealtime/Openfire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/igniterealtime/Openfire/git/refs{/sha}","trees_url":"https://api.github.com/repos/igniterealtime/Openfire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/igniterealtime/Openfire/statuses/{sha}","languages_url":"https://api.github.com/repos/igniterealtime/Openfire/languages","stargazers_url":"https://api.github.com/repos/igniterealtime/Openfire/stargazers","contributors_url":"https://api.github.com/repos/igniterealtime/Openfire/contributors","subscribers_url":"https://api.github.com/repos/igniterealtime/Openfire/subscribers","subscription_url":"https://api.github.com/repos/igniterealtime/Openfire/subscription","commits_url":"https://api.github.com/repos/igniterealtime/Openfire/commits{/sha}","git_commits_url":"https://api.github.com/repos/igniterealtime/Openfire/git/commits{/sha}","comments_url":"https://api.github.com/repos/igniterealtime/Openfire/comments{/number}","issue_comment_url":"https://api.github.com/repos/igniterealtime/Openfire/issues/comments{/number}","contents_url":"https://api.github.com/repos/igniterealtime/Openfire/contents/{+path}","compare_url":"https://api.github.com/repos/igniterealtime/Openfire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/igniterealtime/Openfire/merges","archive_url":"https://api.github.com/repos/igniterealtime/Openfire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/igniterealtime/Openfire/downloads","issues_url":"https://api.github.com/repos/igniterealtime/Openfire/issues{/number}","pulls_url":"https://api.github.com/repos/igniterealtime/Openfire/pulls{/number}","milestones_url":"https://api.github.com/repos/igniterealtime/Openfire/milestones{/number}","notifications_url":"https://api.github.com/repos/igniterealtime/Openfire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/igniterealtime/Openfire/labels{/name}","releases_url":"https://api.github.com/repos/igniterealtime/Openfire/releases{/id}","deployments_url":"https://api.github.com/repos/igniterealtime/Openfire/deployments","created_at":"2014-04-07T09:12:33Z","updated_at":"2016-10-17T08:58:56Z","pushed_at":"2016-10-18T14:06:22Z","git_url":"git://github.com/igniterealtime/Openfire.git","ssh_url":"git@github.com:igniterealtime/Openfire.git","clone_url":"https://github.com/igniterealtime/Openfire.git","svn_url":"https://github.com/igniterealtime/Openfire","homepage":null,"size":851900,"stargazers_count":935,"watchers_count":935,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":694,"mirror_url":null,"open_issues_count":17,"forks":694,"open_issues":17,"watchers":935,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/igniterealtime/Openfire/pulls/656"},"html":{"href":"https://github.com/igniterealtime/Openfire/pull/656"},"issue":{"href":"https://api.github.com/repos/igniterealtime/Openfire/issues/656"},"comments":{"href":"https://api.github.com/repos/igniterealtime/Openfire/issues/656/comments"},"review_comments":{"href":"https://api.github.com/repos/igniterealtime/Openfire/pulls/656/comments"},"review_comment":{"href":"https://api.github.com/repos/igniterealtime/Openfire/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/igniterealtime/Openfire/pulls/656/commits"},"statuses":{"href":"https://api.github.com/repos/igniterealtime/Openfire/statuses/3e747fd36dd951ecba7981e3cb9e12d84590090e"}}}}
{"actor":{"display_login":"guusdk"}}