{"action":"created","comment":{"url":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/comments/52461094","id":52461094,"diff_hunk":"@@ -447,3 +486,15 @@ function writeRemnant(_this, callback) {\n     checkDone(_this);\n   });\n }\n+\n+/**\n+ * @ignore\n+ */\n+\n+function checkAborted(_this, callback) {","path":"lib/gridfs-stream/upload.js","position":89,"original_position":89,"commit_id":"cba13dcbb6e8a3e41ba55fe431dd197a7049d5c8","original_commit_id":"cba13dcbb6e8a3e41ba55fe431dd197a7049d5c8","user":{"login":"triccardi-systran","id":1730297,"avatar_url":"https://avatars.githubusercontent.com/u/1730297?v=3","gravatar_id":"","url":"https://api.github.com/users/triccardi-systran","html_url":"https://github.com/triccardi-systran","followers_url":"https://api.github.com/users/triccardi-systran/followers","following_url":"https://api.github.com/users/triccardi-systran/following{/other_user}","gists_url":"https://api.github.com/users/triccardi-systran/gists{/gist_id}","starred_url":"https://api.github.com/users/triccardi-systran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triccardi-systran/subscriptions","organizations_url":"https://api.github.com/users/triccardi-systran/orgs","repos_url":"https://api.github.com/users/triccardi-systran/repos","events_url":"https://api.github.com/users/triccardi-systran/events{/privacy}","received_events_url":"https://api.github.com/users/triccardi-systran/received_events","type":"User","site_admin":false},"body":"In fact there is still a check missing for the call to `checkDone()` in the callback of `chunks.insert` in `writeRemnant`.\r\n\r\nI think it would be more robust and simpler to just check before all inserts (the line before the insert would help verifications), so add it in `checkDone()` too.","created_at":"2016-02-10T14:12:17Z","updated_at":"2016-02-10T14:12:17Z","html_url":"https://github.com/mongodb/node-mongodb-native/pull/1339#discussion_r52461094","pull_request_url":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1339","_links":{"self":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/comments/52461094"},"html":{"href":"https://github.com/mongodb/node-mongodb-native/pull/1339#discussion_r52461094"},"pull_request":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1339"}}},"pull_request":{"url":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1339","id":58667638,"html_url":"https://github.com/mongodb/node-mongodb-native/pull/1339","diff_url":"https://github.com/mongodb/node-mongodb-native/pull/1339.diff","patch_url":"https://github.com/mongodb/node-mongodb-native/pull/1339.patch","issue_url":"https://api.github.com/repos/mongodb/node-mongodb-native/issues/1339","number":1339,"state":"closed","locked":false,"title":"GridFS stream support for cancelling upload streams and download streams","user":{"login":"vkarpov15","id":1620265,"avatar_url":"https://avatars.githubusercontent.com/u/1620265?v=3","gravatar_id":"","url":"https://api.github.com/users/vkarpov15","html_url":"https://github.com/vkarpov15","followers_url":"https://api.github.com/users/vkarpov15/followers","following_url":"https://api.github.com/users/vkarpov15/following{/other_user}","gists_url":"https://api.github.com/users/vkarpov15/gists{/gist_id}","starred_url":"https://api.github.com/users/vkarpov15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkarpov15/subscriptions","organizations_url":"https://api.github.com/users/vkarpov15/orgs","repos_url":"https://api.github.com/users/vkarpov15/repos","events_url":"https://api.github.com/users/vkarpov15/events{/privacy}","received_events_url":"https://api.github.com/users/vkarpov15/received_events","type":"User","site_admin":false},"body":"Re: https://jira.mongodb.org/browse/NODE-655 .\r\n\r\n* `GridFSBucketUploadStream` now has an `abort()` method as described in [the GridFS stream spec](https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst#file-upload)\r\n* `GridFSBucketDownloadStream` now has a `destroy()` method that is analogous to [node fs read stream's implementation](https://github.com/nodejs/node/blob/1124de2d76ad7118267d91a08485aa928a5f0865/lib/fs.js#L1849-L1854)","created_at":"2016-02-08T21:12:51Z","updated_at":"2016-02-10T14:12:17Z","closed_at":"2016-02-09T08:56:51Z","merged_at":"2016-02-09T08:56:51Z","merge_commit_sha":"a458c374461cd1d29f3c42661c9fc7c7234034bb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1339/commits","review_comments_url":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1339/comments","review_comment_url":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mongodb/node-mongodb-native/issues/1339/comments","statuses_url":"https://api.github.com/repos/mongodb/node-mongodb-native/statuses/cba13dcbb6e8a3e41ba55fe431dd197a7049d5c8","head":{"label":"vkarpov15:NODE-655","ref":"NODE-655","sha":"cba13dcbb6e8a3e41ba55fe431dd197a7049d5c8","user":{"login":"vkarpov15","id":1620265,"avatar_url":"https://avatars.githubusercontent.com/u/1620265?v=3","gravatar_id":"","url":"https://api.github.com/users/vkarpov15","html_url":"https://github.com/vkarpov15","followers_url":"https://api.github.com/users/vkarpov15/followers","following_url":"https://api.github.com/users/vkarpov15/following{/other_user}","gists_url":"https://api.github.com/users/vkarpov15/gists{/gist_id}","starred_url":"https://api.github.com/users/vkarpov15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkarpov15/subscriptions","organizations_url":"https://api.github.com/users/vkarpov15/orgs","repos_url":"https://api.github.com/users/vkarpov15/repos","events_url":"https://api.github.com/users/vkarpov15/events{/privacy}","received_events_url":"https://api.github.com/users/vkarpov15/received_events","type":"User","site_admin":false},"repo":{"id":51310791,"name":"node-mongodb-native","full_name":"vkarpov15/node-mongodb-native","owner":{"login":"vkarpov15","id":1620265,"avatar_url":"https://avatars.githubusercontent.com/u/1620265?v=3","gravatar_id":"","url":"https://api.github.com/users/vkarpov15","html_url":"https://github.com/vkarpov15","followers_url":"https://api.github.com/users/vkarpov15/followers","following_url":"https://api.github.com/users/vkarpov15/following{/other_user}","gists_url":"https://api.github.com/users/vkarpov15/gists{/gist_id}","starred_url":"https://api.github.com/users/vkarpov15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkarpov15/subscriptions","organizations_url":"https://api.github.com/users/vkarpov15/orgs","repos_url":"https://api.github.com/users/vkarpov15/repos","events_url":"https://api.github.com/users/vkarpov15/events{/privacy}","received_events_url":"https://api.github.com/users/vkarpov15/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vkarpov15/node-mongodb-native","description":"Mongo DB Native NodeJS Driver","fork":true,"url":"https://api.github.com/repos/vkarpov15/node-mongodb-native","forks_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/forks","keys_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/teams","hooks_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/hooks","issue_events_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/issues/events{/number}","events_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/events","assignees_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/assignees{/user}","branches_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/branches{/branch}","tags_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/tags","blobs_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/statuses/{sha}","languages_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/languages","stargazers_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/stargazers","contributors_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/contributors","subscribers_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/subscribers","subscription_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/subscription","commits_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/contents/{+path}","compare_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/merges","archive_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/downloads","issues_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/issues{/number}","pulls_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/pulls{/number}","milestones_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/milestones{/number}","notifications_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/labels{/name}","releases_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/releases{/id}","deployments_url":"https://api.github.com/repos/vkarpov15/node-mongodb-native/deployments","created_at":"2016-02-08T16:45:11Z","updated_at":"2016-02-08T16:45:13Z","pushed_at":"2016-02-09T16:25:55Z","git_url":"git://github.com/vkarpov15/node-mongodb-native.git","ssh_url":"git@github.com:vkarpov15/node-mongodb-native.git","clone_url":"https://github.com/vkarpov15/node-mongodb-native.git","svn_url":"https://github.com/vkarpov15/node-mongodb-native","homepage":"http://mongodb.github.com/node-mongodb-native/","size":77636,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"2.1"}},"base":{"label":"mongodb:2.1","ref":"2.1","sha":"df9e2a07b2210fdc56f990709f79480def054e05","user":{"login":"mongodb","id":45120,"avatar_url":"https://avatars.githubusercontent.com/u/45120?v=3","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"repo":{"id":462292,"name":"node-mongodb-native","full_name":"mongodb/node-mongodb-native","owner":{"login":"mongodb","id":45120,"avatar_url":"https://avatars.githubusercontent.com/u/45120?v=3","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mongodb/node-mongodb-native","description":"Mongo DB Native NodeJS Driver","fork":false,"url":"https://api.github.com/repos/mongodb/node-mongodb-native","forks_url":"https://api.github.com/repos/mongodb/node-mongodb-native/forks","keys_url":"https://api.github.com/repos/mongodb/node-mongodb-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb/node-mongodb-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb/node-mongodb-native/teams","hooks_url":"https://api.github.com/repos/mongodb/node-mongodb-native/hooks","issue_events_url":"https://api.github.com/repos/mongodb/node-mongodb-native/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb/node-mongodb-native/events","assignees_url":"https://api.github.com/repos/mongodb/node-mongodb-native/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb/node-mongodb-native/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb/node-mongodb-native/tags","blobs_url":"https://api.github.com/repos/mongodb/node-mongodb-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb/node-mongodb-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb/node-mongodb-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb/node-mongodb-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb/node-mongodb-native/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb/node-mongodb-native/languages","stargazers_url":"https://api.github.com/repos/mongodb/node-mongodb-native/stargazers","contributors_url":"https://api.github.com/repos/mongodb/node-mongodb-native/contributors","subscribers_url":"https://api.github.com/repos/mongodb/node-mongodb-native/subscribers","subscription_url":"https://api.github.com/repos/mongodb/node-mongodb-native/subscription","commits_url":"https://api.github.com/repos/mongodb/node-mongodb-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb/node-mongodb-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb/node-mongodb-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb/node-mongodb-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb/node-mongodb-native/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb/node-mongodb-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb/node-mongodb-native/merges","archive_url":"https://api.github.com/repos/mongodb/node-mongodb-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb/node-mongodb-native/downloads","issues_url":"https://api.github.com/repos/mongodb/node-mongodb-native/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb/node-mongodb-native/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb/node-mongodb-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb/node-mongodb-native/labels{/name}","releases_url":"https://api.github.com/repos/mongodb/node-mongodb-native/releases{/id}","deployments_url":"https://api.github.com/repos/mongodb/node-mongodb-native/deployments","created_at":"2010-01-07T12:50:50Z","updated_at":"2016-02-10T13:24:58Z","pushed_at":"2016-02-09T16:29:44Z","git_url":"git://github.com/mongodb/node-mongodb-native.git","ssh_url":"git@github.com:mongodb/node-mongodb-native.git","clone_url":"https://github.com/mongodb/node-mongodb-native.git","svn_url":"https://github.com/mongodb/node-mongodb-native","homepage":"http://mongodb.github.com/node-mongodb-native/","size":78832,"stargazers_count":4471,"watchers_count":4471,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":965,"mirror_url":null,"open_issues_count":8,"forks":965,"open_issues":8,"watchers":4471,"default_branch":"2.1"}},"_links":{"self":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1339"},"html":{"href":"https://github.com/mongodb/node-mongodb-native/pull/1339"},"issue":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/issues/1339"},"comments":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/issues/1339/comments"},"review_comments":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1339/comments"},"review_comment":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1339/commits"},"statuses":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/statuses/cba13dcbb6e8a3e41ba55fe431dd197a7049d5c8"}}}}