{"action":"created","comment":{"url":"https://api.github.com/repos/dask/dask/pulls/comments/195201202","pull_request_review_id":128521648,"id":195201202,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTIwMTIwMg==","diff_hunk":"@@ -3366,6 +3366,18 @@ def test_zarr_roundtrip():\n         assert a2.chunks == a.chunks\n \n \n+def test_zarr_distributed_roundtrip():\n+    zarr = pytest.importorskip('zarr')\n+    distributed = pytest.importorskip('distributed')\n+    with tmpdir() as d:\n+        with distributed.Client(n_workers=2, threads_per_worker=1):\n+            a = da.zeros((3, 3), chunks=(1, 1))\n+            a.to_zarr(d)\n+            a2 = da.from_zarr(d)\n+            assert_eq(a, a2)\n+            assert a2.chunks == a.chunks","path":"dask/array/tests/test_array_core.py","position":null,"original_position":13,"commit_id":"e3b2df5fd85de09589a7512eb8ba4c5a9ed83605","original_commit_id":"540acb42dbb5bbb1bfa355d6130ee62d576da940","user":{"login":"jakirkham","id":3019665,"node_id":"MDQ6VXNlcjMwMTk2NjU=","avatar_url":"https://avatars1.githubusercontent.com/u/3019665?v=4","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"body":"Added a PR ( https://github.com/dask/dask/pull/3609 ) to try and refresh that test.","created_at":"2018-06-13T19:04:12Z","updated_at":"2018-06-13T19:04:12Z","html_url":"https://github.com/dask/dask/pull/3607#discussion_r195201202","pull_request_url":"https://api.github.com/repos/dask/dask/pulls/3607","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dask/dask/pulls/comments/195201202"},"html":{"href":"https://github.com/dask/dask/pull/3607#discussion_r195201202"},"pull_request":{"href":"https://api.github.com/repos/dask/dask/pulls/3607"}},"in_reply_to_id":195158385},"pull_request":{"url":"https://api.github.com/repos/dask/dask/pulls/3607","id":194645055,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NjQ1MDU1","html_url":"https://github.com/dask/dask/pull/3607","diff_url":"https://github.com/dask/dask/pull/3607.diff","patch_url":"https://github.com/dask/dask/pull/3607.patch","issue_url":"https://api.github.com/repos/dask/dask/issues/3607","number":3607,"state":"open","locked":false,"title":"Disable locking in to_zarr (needed for using to_zarr in a distributed context)","user":{"login":"jakirkham","id":3019665,"node_id":"MDQ6VXNlcjMwMTk2NjU=","avatar_url":"https://avatars1.githubusercontent.com/u/3019665?v=4","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"body":"Appears that `to_zarr` was defaulting to `store`'s behavior of using a `threading.Lock` object for each chunk written. As the `threading.Lock` object is not pickleable, this fails when using Distributed. Since we already guarantee the chunks are aligned, just disable any kind of locking in `to_zarr`. Includes a test using a small Distributed cluster that fails without this change and passes with it.\r\n\r\n- [x] Tests added / passed\r\n- [x] Passes `flake8 dask`\r\n","created_at":"2018-06-13T16:28:09Z","updated_at":"2018-06-13T19:04:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f024220e10105c198c18a3d85b9914d7e65896bf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dask/dask/pulls/3607/commits","review_comments_url":"https://api.github.com/repos/dask/dask/pulls/3607/comments","review_comment_url":"https://api.github.com/repos/dask/dask/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dask/dask/issues/3607/comments","statuses_url":"https://api.github.com/repos/dask/dask/statuses/e3b2df5fd85de09589a7512eb8ba4c5a9ed83605","head":{"label":"jakirkham:no_lock_in_to_zarr","ref":"no_lock_in_to_zarr","sha":"e3b2df5fd85de09589a7512eb8ba4c5a9ed83605","user":{"login":"jakirkham","id":3019665,"node_id":"MDQ6VXNlcjMwMTk2NjU=","avatar_url":"https://avatars1.githubusercontent.com/u/3019665?v=4","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"repo":{"id":31235042,"node_id":"MDEwOlJlcG9zaXRvcnkzMTIzNTA0Mg==","name":"dask","full_name":"jakirkham/dask","owner":{"login":"jakirkham","id":3019665,"node_id":"MDQ6VXNlcjMwMTk2NjU=","avatar_url":"https://avatars1.githubusercontent.com/u/3019665?v=4","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jakirkham/dask","description":"Minimal task scheduling abstraction","fork":true,"url":"https://api.github.com/repos/jakirkham/dask","forks_url":"https://api.github.com/repos/jakirkham/dask/forks","keys_url":"https://api.github.com/repos/jakirkham/dask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jakirkham/dask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jakirkham/dask/teams","hooks_url":"https://api.github.com/repos/jakirkham/dask/hooks","issue_events_url":"https://api.github.com/repos/jakirkham/dask/issues/events{/number}","events_url":"https://api.github.com/repos/jakirkham/dask/events","assignees_url":"https://api.github.com/repos/jakirkham/dask/assignees{/user}","branches_url":"https://api.github.com/repos/jakirkham/dask/branches{/branch}","tags_url":"https://api.github.com/repos/jakirkham/dask/tags","blobs_url":"https://api.github.com/repos/jakirkham/dask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jakirkham/dask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jakirkham/dask/git/refs{/sha}","trees_url":"https://api.github.com/repos/jakirkham/dask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jakirkham/dask/statuses/{sha}","languages_url":"https://api.github.com/repos/jakirkham/dask/languages","stargazers_url":"https://api.github.com/repos/jakirkham/dask/stargazers","contributors_url":"https://api.github.com/repos/jakirkham/dask/contributors","subscribers_url":"https://api.github.com/repos/jakirkham/dask/subscribers","subscription_url":"https://api.github.com/repos/jakirkham/dask/subscription","commits_url":"https://api.github.com/repos/jakirkham/dask/commits{/sha}","git_commits_url":"https://api.github.com/repos/jakirkham/dask/git/commits{/sha}","comments_url":"https://api.github.com/repos/jakirkham/dask/comments{/number}","issue_comment_url":"https://api.github.com/repos/jakirkham/dask/issues/comments{/number}","contents_url":"https://api.github.com/repos/jakirkham/dask/contents/{+path}","compare_url":"https://api.github.com/repos/jakirkham/dask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jakirkham/dask/merges","archive_url":"https://api.github.com/repos/jakirkham/dask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jakirkham/dask/downloads","issues_url":"https://api.github.com/repos/jakirkham/dask/issues{/number}","pulls_url":"https://api.github.com/repos/jakirkham/dask/pulls{/number}","milestones_url":"https://api.github.com/repos/jakirkham/dask/milestones{/number}","notifications_url":"https://api.github.com/repos/jakirkham/dask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jakirkham/dask/labels{/name}","releases_url":"https://api.github.com/repos/jakirkham/dask/releases{/id}","deployments_url":"https://api.github.com/repos/jakirkham/dask/deployments","created_at":"2015-02-23T23:11:16Z","updated_at":"2018-06-13T17:06:15Z","pushed_at":"2018-06-13T19:02:46Z","git_url":"git://github.com/jakirkham/dask.git","ssh_url":"git@github.com:jakirkham/dask.git","clone_url":"https://github.com/jakirkham/dask.git","svn_url":"https://github.com/jakirkham/dask","homepage":"","size":17111,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dask:master","ref":"master","sha":"279fdf7a6a78a1dfaa0974598aead3e1b44f9194","user":{"login":"dask","id":17131925,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTMxOTI1","avatar_url":"https://avatars1.githubusercontent.com/u/17131925?v=4","gravatar_id":"","url":"https://api.github.com/users/dask","html_url":"https://github.com/dask","followers_url":"https://api.github.com/users/dask/followers","following_url":"https://api.github.com/users/dask/following{/other_user}","gists_url":"https://api.github.com/users/dask/gists{/gist_id}","starred_url":"https://api.github.com/users/dask/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dask/subscriptions","organizations_url":"https://api.github.com/users/dask/orgs","repos_url":"https://api.github.com/users/dask/repos","events_url":"https://api.github.com/users/dask/events{/privacy}","received_events_url":"https://api.github.com/users/dask/received_events","type":"Organization","site_admin":false},"repo":{"id":28782747,"node_id":"MDEwOlJlcG9zaXRvcnkyODc4Mjc0Nw==","name":"dask","full_name":"dask/dask","owner":{"login":"dask","id":17131925,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTMxOTI1","avatar_url":"https://avatars1.githubusercontent.com/u/17131925?v=4","gravatar_id":"","url":"https://api.github.com/users/dask","html_url":"https://github.com/dask","followers_url":"https://api.github.com/users/dask/followers","following_url":"https://api.github.com/users/dask/following{/other_user}","gists_url":"https://api.github.com/users/dask/gists{/gist_id}","starred_url":"https://api.github.com/users/dask/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dask/subscriptions","organizations_url":"https://api.github.com/users/dask/orgs","repos_url":"https://api.github.com/users/dask/repos","events_url":"https://api.github.com/users/dask/events{/privacy}","received_events_url":"https://api.github.com/users/dask/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dask/dask","description":"Parallel computing with task scheduling","fork":false,"url":"https://api.github.com/repos/dask/dask","forks_url":"https://api.github.com/repos/dask/dask/forks","keys_url":"https://api.github.com/repos/dask/dask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dask/dask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dask/dask/teams","hooks_url":"https://api.github.com/repos/dask/dask/hooks","issue_events_url":"https://api.github.com/repos/dask/dask/issues/events{/number}","events_url":"https://api.github.com/repos/dask/dask/events","assignees_url":"https://api.github.com/repos/dask/dask/assignees{/user}","branches_url":"https://api.github.com/repos/dask/dask/branches{/branch}","tags_url":"https://api.github.com/repos/dask/dask/tags","blobs_url":"https://api.github.com/repos/dask/dask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dask/dask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dask/dask/git/refs{/sha}","trees_url":"https://api.github.com/repos/dask/dask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dask/dask/statuses/{sha}","languages_url":"https://api.github.com/repos/dask/dask/languages","stargazers_url":"https://api.github.com/repos/dask/dask/stargazers","contributors_url":"https://api.github.com/repos/dask/dask/contributors","subscribers_url":"https://api.github.com/repos/dask/dask/subscribers","subscription_url":"https://api.github.com/repos/dask/dask/subscription","commits_url":"https://api.github.com/repos/dask/dask/commits{/sha}","git_commits_url":"https://api.github.com/repos/dask/dask/git/commits{/sha}","comments_url":"https://api.github.com/repos/dask/dask/comments{/number}","issue_comment_url":"https://api.github.com/repos/dask/dask/issues/comments{/number}","contents_url":"https://api.github.com/repos/dask/dask/contents/{+path}","compare_url":"https://api.github.com/repos/dask/dask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dask/dask/merges","archive_url":"https://api.github.com/repos/dask/dask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dask/dask/downloads","issues_url":"https://api.github.com/repos/dask/dask/issues{/number}","pulls_url":"https://api.github.com/repos/dask/dask/pulls{/number}","milestones_url":"https://api.github.com/repos/dask/dask/milestones{/number}","notifications_url":"https://api.github.com/repos/dask/dask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dask/dask/labels{/name}","releases_url":"https://api.github.com/repos/dask/dask/releases{/id}","deployments_url":"https://api.github.com/repos/dask/dask/deployments","created_at":"2015-01-04T18:50:00Z","updated_at":"2018-06-13T18:40:51Z","pushed_at":"2018-06-13T19:03:55Z","git_url":"git://github.com/dask/dask.git","ssh_url":"git@github.com:dask/dask.git","clone_url":"https://github.com/dask/dask.git","svn_url":"https://github.com/dask/dask","homepage":"http://dask.pydata.org","size":17079,"stargazers_count":2981,"watchers_count":2981,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":503,"mirror_url":null,"archived":false,"open_issues_count":456,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":503,"open_issues":456,"watchers":2981,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dask/dask/pulls/3607"},"html":{"href":"https://github.com/dask/dask/pull/3607"},"issue":{"href":"https://api.github.com/repos/dask/dask/issues/3607"},"comments":{"href":"https://api.github.com/repos/dask/dask/issues/3607/comments"},"review_comments":{"href":"https://api.github.com/repos/dask/dask/pulls/3607/comments"},"review_comment":{"href":"https://api.github.com/repos/dask/dask/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dask/dask/pulls/3607/commits"},"statuses":{"href":"https://api.github.com/repos/dask/dask/statuses/e3b2df5fd85de09589a7512eb8ba4c5a9ed83605"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jakirkham"}}