{"action":"created","comment":{"url":"https://api.github.com/repos/Tribler/dispersy/pulls/comments/69587754","id":69587754,"diff_hunk":"@@ -10,80 +14,100 @@ def __init__(self, *args, **kargs):\n         self._big_batch_took = 0.0\n         self._small_batches_took = 0.0\n \n+    @deferred(timeout=10)\n+    @inlineCallbacks\n     def test_one_batch(self):\n-        node, other = self.create_nodes(2)\n-        other.send_identity(node)\n+        node, other = yield self.create_nodes(2)\n+        yield other.send_identity(node)\n+\n+        messages = []\n+        for i in range(10):","path":"tests/test_batch.py","position":23,"original_position":23,"commit_id":"d5f9af7ba2d9dc538056ede8330a482db3e9407c","original_commit_id":"d5f9af7ba2d9dc538056ede8330a482db3e9407c","user":{"login":"devos50","id":1707075,"avatar_url":"https://avatars.githubusercontent.com/u/1707075?v=3","gravatar_id":"","url":"https://api.github.com/users/devos50","html_url":"https://github.com/devos50","followers_url":"https://api.github.com/users/devos50/followers","following_url":"https://api.github.com/users/devos50/following{/other_user}","gists_url":"https://api.github.com/users/devos50/gists{/gist_id}","starred_url":"https://api.github.com/users/devos50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devos50/subscriptions","organizations_url":"https://api.github.com/users/devos50/orgs","repos_url":"https://api.github.com/users/devos50/repos","events_url":"https://api.github.com/users/devos50/events{/privacy}","received_events_url":"https://api.github.com/users/devos50/received_events","type":"User","site_admin":false},"body":"xrange","created_at":"2016-07-05T15:48:57Z","updated_at":"2016-07-05T15:48:57Z","html_url":"https://github.com/Tribler/dispersy/pull/481#discussion_r69587754","pull_request_url":"https://api.github.com/repos/Tribler/dispersy/pulls/481","_links":{"self":{"href":"https://api.github.com/repos/Tribler/dispersy/pulls/comments/69587754"},"html":{"href":"https://github.com/Tribler/dispersy/pull/481#discussion_r69587754"},"pull_request":{"href":"https://api.github.com/repos/Tribler/dispersy/pulls/481"}}},"pull_request":{"url":"https://api.github.com/repos/Tribler/dispersy/pulls/481","id":71367401,"html_url":"https://github.com/Tribler/dispersy/pull/481","diff_url":"https://github.com/Tribler/dispersy/pull/481.diff","patch_url":"https://github.com/Tribler/dispersy/pull/481.patch","issue_url":"https://api.github.com/repos/Tribler/dispersy/issues/481","number":481,"state":"open","locked":false,"title":"WIP: Storm db manager","user":{"login":"lfdversluis","id":3618917,"avatar_url":"https://avatars.githubusercontent.com/u/3618917?v=3","gravatar_id":"","url":"https://api.github.com/users/lfdversluis","html_url":"https://github.com/lfdversluis","followers_url":"https://api.github.com/users/lfdversluis/followers","following_url":"https://api.github.com/users/lfdversluis/following{/other_user}","gists_url":"https://api.github.com/users/lfdversluis/gists{/gist_id}","starred_url":"https://api.github.com/users/lfdversluis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfdversluis/subscriptions","organizations_url":"https://api.github.com/users/lfdversluis/orgs","repos_url":"https://api.github.com/users/lfdversluis/repos","events_url":"https://api.github.com/users/lfdversluis/events{/privacy}","received_events_url":"https://api.github.com/users/lfdversluis/received_events","type":"User","site_admin":false},"body":"I open this PR so people can view the progress on this work and provide **feedback and or suggestions**.\r\n\r\nThis will become the database manager used in Tribler/Dispersy to do IO on a separate thread to gain performance.\r\n**Small performance indicator:** The current synchronous, blocking tests take [635-640 seconds to complete](https://jenkins.tribler.org/job/dispersy/job/GH/job/PR/job/Unit_tests_linux/1652/console). Now with **18** more tests, it takes [375 seconds](https://jenkins.tribler.org/job/dispersy/job/GH/job/PR/job/Unit_tests_linux/1658/console).\r\n\r\nAdds the Storm DB manager (feature).\r\nAdds **18** tests\r\n\r\nFixes #488 Fixes #484 \r\n\r\n# Refactoring progress:\r\n\r\n| File  | Uses Stormdb? (Synchronous and blocking)   | \r\n|---|---|\r\n| `dispersy.py` | √  |\r\n| `community.py` | √  |\r\n| `multichain DB` | x | \r\n| `DispersyDatabase` | √ | \r\n| `statistics.py` | √ | \r\n| `node.py` | √ | \r\n| `test_classification.py` | √ |\r\n| `test_sync.py` | √ |\r\n| `test_undo.py` | √ \r\n| `tracker/community.py` | √ |\r\n| `database.py` | √ |\r\n\r\n| Database function | Returning deferred ? | Running on threadpool ?\r\n|---|---|---|\r\n| `execute` | √ | √ |\r\n| `execute_many` | √ | √ |\r\n| `insert` | √ | √ |\r\n| `fetchone` | √ | √ |\r\n| `fetchall` | √ | √ |\r\n| `executescript` | √ | √ |\r\n| `insert_many` | √ | √ |\r\n| `delete` | √ | √ |\r\n| `count` | √ | √ |\r\n\r\n### Impact changes for Tribler et al.\r\n`dispersy_auto_load` was previously a setter and getter using `@propery`. I've left the getter untouched but it returns a deferred now. The setter however is a function now `set_dispersy_auto_load` which returns a deferred too.  This setter was only used in a test, but probably is used more in Tribler.\r\n\r\n","created_at":"2016-05-25T10:35:05Z","updated_at":"2016-07-05T15:48:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7c8c13ec79765de036daf36f2cfe6da595e02a3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Tribler/dispersy/pulls/481/commits","review_comments_url":"https://api.github.com/repos/Tribler/dispersy/pulls/481/comments","review_comment_url":"https://api.github.com/repos/Tribler/dispersy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Tribler/dispersy/issues/481/comments","statuses_url":"https://api.github.com/repos/Tribler/dispersy/statuses/d5f9af7ba2d9dc538056ede8330a482db3e9407c","head":{"label":"lfdversluis:storm-db-manager","ref":"storm-db-manager","sha":"d5f9af7ba2d9dc538056ede8330a482db3e9407c","user":{"login":"lfdversluis","id":3618917,"avatar_url":"https://avatars.githubusercontent.com/u/3618917?v=3","gravatar_id":"","url":"https://api.github.com/users/lfdversluis","html_url":"https://github.com/lfdversluis","followers_url":"https://api.github.com/users/lfdversluis/followers","following_url":"https://api.github.com/users/lfdversluis/following{/other_user}","gists_url":"https://api.github.com/users/lfdversluis/gists{/gist_id}","starred_url":"https://api.github.com/users/lfdversluis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfdversluis/subscriptions","organizations_url":"https://api.github.com/users/lfdversluis/orgs","repos_url":"https://api.github.com/users/lfdversluis/repos","events_url":"https://api.github.com/users/lfdversluis/events{/privacy}","received_events_url":"https://api.github.com/users/lfdversluis/received_events","type":"User","site_admin":false},"repo":{"id":57133105,"name":"dispersy","full_name":"lfdversluis/dispersy","owner":{"login":"lfdversluis","id":3618917,"avatar_url":"https://avatars.githubusercontent.com/u/3618917?v=3","gravatar_id":"","url":"https://api.github.com/users/lfdversluis","html_url":"https://github.com/lfdversluis","followers_url":"https://api.github.com/users/lfdversluis/followers","following_url":"https://api.github.com/users/lfdversluis/following{/other_user}","gists_url":"https://api.github.com/users/lfdversluis/gists{/gist_id}","starred_url":"https://api.github.com/users/lfdversluis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfdversluis/subscriptions","organizations_url":"https://api.github.com/users/lfdversluis/orgs","repos_url":"https://api.github.com/users/lfdversluis/repos","events_url":"https://api.github.com/users/lfdversluis/events{/privacy}","received_events_url":"https://api.github.com/users/lfdversluis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lfdversluis/dispersy","description":"The elastic database system. A database designed for P2P-like scenarios, where potentially millions of computers send database updates around.","fork":true,"url":"https://api.github.com/repos/lfdversluis/dispersy","forks_url":"https://api.github.com/repos/lfdversluis/dispersy/forks","keys_url":"https://api.github.com/repos/lfdversluis/dispersy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lfdversluis/dispersy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lfdversluis/dispersy/teams","hooks_url":"https://api.github.com/repos/lfdversluis/dispersy/hooks","issue_events_url":"https://api.github.com/repos/lfdversluis/dispersy/issues/events{/number}","events_url":"https://api.github.com/repos/lfdversluis/dispersy/events","assignees_url":"https://api.github.com/repos/lfdversluis/dispersy/assignees{/user}","branches_url":"https://api.github.com/repos/lfdversluis/dispersy/branches{/branch}","tags_url":"https://api.github.com/repos/lfdversluis/dispersy/tags","blobs_url":"https://api.github.com/repos/lfdversluis/dispersy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lfdversluis/dispersy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lfdversluis/dispersy/git/refs{/sha}","trees_url":"https://api.github.com/repos/lfdversluis/dispersy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lfdversluis/dispersy/statuses/{sha}","languages_url":"https://api.github.com/repos/lfdversluis/dispersy/languages","stargazers_url":"https://api.github.com/repos/lfdversluis/dispersy/stargazers","contributors_url":"https://api.github.com/repos/lfdversluis/dispersy/contributors","subscribers_url":"https://api.github.com/repos/lfdversluis/dispersy/subscribers","subscription_url":"https://api.github.com/repos/lfdversluis/dispersy/subscription","commits_url":"https://api.github.com/repos/lfdversluis/dispersy/commits{/sha}","git_commits_url":"https://api.github.com/repos/lfdversluis/dispersy/git/commits{/sha}","comments_url":"https://api.github.com/repos/lfdversluis/dispersy/comments{/number}","issue_comment_url":"https://api.github.com/repos/lfdversluis/dispersy/issues/comments{/number}","contents_url":"https://api.github.com/repos/lfdversluis/dispersy/contents/{+path}","compare_url":"https://api.github.com/repos/lfdversluis/dispersy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lfdversluis/dispersy/merges","archive_url":"https://api.github.com/repos/lfdversluis/dispersy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lfdversluis/dispersy/downloads","issues_url":"https://api.github.com/repos/lfdversluis/dispersy/issues{/number}","pulls_url":"https://api.github.com/repos/lfdversluis/dispersy/pulls{/number}","milestones_url":"https://api.github.com/repos/lfdversluis/dispersy/milestones{/number}","notifications_url":"https://api.github.com/repos/lfdversluis/dispersy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lfdversluis/dispersy/labels{/name}","releases_url":"https://api.github.com/repos/lfdversluis/dispersy/releases{/id}","deployments_url":"https://api.github.com/repos/lfdversluis/dispersy/deployments","created_at":"2016-04-26T14:03:23Z","updated_at":"2016-04-26T14:03:24Z","pushed_at":"2016-07-04T11:27:47Z","git_url":"git://github.com/lfdversluis/dispersy.git","ssh_url":"git@github.com:lfdversluis/dispersy.git","clone_url":"https://github.com/lfdversluis/dispersy.git","svn_url":"https://github.com/lfdversluis/dispersy","homepage":"http://www.tribler.org","size":7617,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"devel"}},"base":{"label":"Tribler:devel","ref":"devel","sha":"687a5f40a1caeb25d3674895d6610de971819a81","user":{"login":"Tribler","id":2913489,"avatar_url":"https://avatars.githubusercontent.com/u/2913489?v=3","gravatar_id":"","url":"https://api.github.com/users/Tribler","html_url":"https://github.com/Tribler","followers_url":"https://api.github.com/users/Tribler/followers","following_url":"https://api.github.com/users/Tribler/following{/other_user}","gists_url":"https://api.github.com/users/Tribler/gists{/gist_id}","starred_url":"https://api.github.com/users/Tribler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tribler/subscriptions","organizations_url":"https://api.github.com/users/Tribler/orgs","repos_url":"https://api.github.com/users/Tribler/repos","events_url":"https://api.github.com/users/Tribler/events{/privacy}","received_events_url":"https://api.github.com/users/Tribler/received_events","type":"Organization","site_admin":false},"repo":{"id":8432681,"name":"dispersy","full_name":"Tribler/dispersy","owner":{"login":"Tribler","id":2913489,"avatar_url":"https://avatars.githubusercontent.com/u/2913489?v=3","gravatar_id":"","url":"https://api.github.com/users/Tribler","html_url":"https://github.com/Tribler","followers_url":"https://api.github.com/users/Tribler/followers","following_url":"https://api.github.com/users/Tribler/following{/other_user}","gists_url":"https://api.github.com/users/Tribler/gists{/gist_id}","starred_url":"https://api.github.com/users/Tribler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tribler/subscriptions","organizations_url":"https://api.github.com/users/Tribler/orgs","repos_url":"https://api.github.com/users/Tribler/repos","events_url":"https://api.github.com/users/Tribler/events{/privacy}","received_events_url":"https://api.github.com/users/Tribler/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Tribler/dispersy","description":"The elastic database system. A database designed for P2P-like scenarios, where potentially millions of computers send database updates around.","fork":false,"url":"https://api.github.com/repos/Tribler/dispersy","forks_url":"https://api.github.com/repos/Tribler/dispersy/forks","keys_url":"https://api.github.com/repos/Tribler/dispersy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tribler/dispersy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tribler/dispersy/teams","hooks_url":"https://api.github.com/repos/Tribler/dispersy/hooks","issue_events_url":"https://api.github.com/repos/Tribler/dispersy/issues/events{/number}","events_url":"https://api.github.com/repos/Tribler/dispersy/events","assignees_url":"https://api.github.com/repos/Tribler/dispersy/assignees{/user}","branches_url":"https://api.github.com/repos/Tribler/dispersy/branches{/branch}","tags_url":"https://api.github.com/repos/Tribler/dispersy/tags","blobs_url":"https://api.github.com/repos/Tribler/dispersy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tribler/dispersy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tribler/dispersy/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tribler/dispersy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tribler/dispersy/statuses/{sha}","languages_url":"https://api.github.com/repos/Tribler/dispersy/languages","stargazers_url":"https://api.github.com/repos/Tribler/dispersy/stargazers","contributors_url":"https://api.github.com/repos/Tribler/dispersy/contributors","subscribers_url":"https://api.github.com/repos/Tribler/dispersy/subscribers","subscription_url":"https://api.github.com/repos/Tribler/dispersy/subscription","commits_url":"https://api.github.com/repos/Tribler/dispersy/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tribler/dispersy/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tribler/dispersy/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tribler/dispersy/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tribler/dispersy/contents/{+path}","compare_url":"https://api.github.com/repos/Tribler/dispersy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tribler/dispersy/merges","archive_url":"https://api.github.com/repos/Tribler/dispersy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tribler/dispersy/downloads","issues_url":"https://api.github.com/repos/Tribler/dispersy/issues{/number}","pulls_url":"https://api.github.com/repos/Tribler/dispersy/pulls{/number}","milestones_url":"https://api.github.com/repos/Tribler/dispersy/milestones{/number}","notifications_url":"https://api.github.com/repos/Tribler/dispersy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tribler/dispersy/labels{/name}","releases_url":"https://api.github.com/repos/Tribler/dispersy/releases{/id}","deployments_url":"https://api.github.com/repos/Tribler/dispersy/deployments","created_at":"2013-02-26T13:10:21Z","updated_at":"2016-07-01T22:20:57Z","pushed_at":"2016-07-05T15:39:37Z","git_url":"git://github.com/Tribler/dispersy.git","ssh_url":"git@github.com:Tribler/dispersy.git","clone_url":"https://github.com/Tribler/dispersy.git","svn_url":"https://github.com/Tribler/dispersy","homepage":"http://www.tribler.org","size":9040,"stargazers_count":44,"watchers_count":44,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":44,"forks":30,"open_issues":44,"watchers":44,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/Tribler/dispersy/pulls/481"},"html":{"href":"https://github.com/Tribler/dispersy/pull/481"},"issue":{"href":"https://api.github.com/repos/Tribler/dispersy/issues/481"},"comments":{"href":"https://api.github.com/repos/Tribler/dispersy/issues/481/comments"},"review_comments":{"href":"https://api.github.com/repos/Tribler/dispersy/pulls/481/comments"},"review_comment":{"href":"https://api.github.com/repos/Tribler/dispersy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Tribler/dispersy/pulls/481/commits"},"statuses":{"href":"https://api.github.com/repos/Tribler/dispersy/statuses/d5f9af7ba2d9dc538056ede8330a482db3e9407c"}}}}
{"actor":{"display_login":"devos50"}}