{"action":"created","comment":{"url":"https://api.github.com/repos/mongodb/mongo-c-driver/pulls/comments/26581030","id":26581030,"diff_hunk":"@@ -1794,51 +1858,20 @@ _mongoc_cluster_min_of_max_msg_size_nodes (void *item,\n  *--------------------------------------------------------------------------\n  */\n int32_t\n-mongoc_cluster_get_max_bson_obj_size (mongoc_cluster_t *cluster,\n-                                      uint32_t         *server_id /* IN */)\n+mongoc_cluster_get_max_bson_obj_size (mongoc_cluster_t *cluster)\n {\n-   mongoc_server_description_t *sd;\n-   mongoc_cluster_node_t *node;\n-   mongoc_topology_t *topology;\n    int32_t max_bson_obj_size = -1;\n-   bool single_threaded;\n-\n-   topology = cluster->client->topology;\n-   mongoc_mutex_lock (&topology->mutex);\n-   single_threaded = topology->single_threaded;\n-   mongoc_mutex_unlock (&topology->mutex);\n-\n-   if (server_id) {\n-      if (!single_threaded) {\n-         /* if we can, use information stored in cluster node */\n-         node = mongoc_set_get (cluster->nodes, *server_id);\n-         if (node) {\n-            max_bson_obj_size = node->max_bson_obj_size;\n-         }\n-      } else {\n-         /* otherwise, check the server description */\n-         mongoc_mutex_lock (&topology->mutex);\n-         sd = mongoc_set_get (topology->description.servers, *server_id);\n-         if (sd) {\n-            max_bson_obj_size = sd->max_bson_obj_size;\n-         }\n-         mongoc_mutex_unlock (&topology->mutex);\n-      }\n-   }\n \n-   if (max_bson_obj_size == -1) {\n-      max_bson_obj_size = MONGOC_CLUSTER_DEFAULT_BSON_OBJ_SIZE;\n+   max_bson_obj_size = MONGOC_DEFAULT_BSON_OBJ_SIZE;\n \n-      /* if no server was found or given, get min of all values */\n-      if (!single_threaded) {\n-         mongoc_set_for_each (cluster->nodes,\n-                              _mongoc_cluster_min_of_max_obj_size_nodes,\n-                              &max_bson_obj_size);\n-      } else {\n-         mongoc_set_for_each (topology->description.servers,\n-                              _mongoc_cluster_min_of_max_obj_size_sds,\n-                              &max_bson_obj_size);\n-      }\n+   if (!cluster->client->topology->single_threaded) {\n+      mongoc_set_for_each (cluster->nodes,\n+                           _mongoc_cluster_min_of_max_obj_size_nodes,\n+                           &max_bson_obj_size);\n+   } else {\n+      mongoc_set_for_each (cluster->client->topology->description.servers,","path":"src/mongoc/mongoc-cluster.c","position":194,"original_position":194,"commit_id":"2b8e9590631c9eac77f45c7c044510e29f22e5a4","original_commit_id":"2b8e9590631c9eac77f45c7c044510e29f22e5a4","user":{"login":"samantharitter","id":1824529,"avatar_url":"https://avatars.githubusercontent.com/u/1824529?v=3","gravatar_id":"","url":"https://api.github.com/users/samantharitter","html_url":"https://github.com/samantharitter","followers_url":"https://api.github.com/users/samantharitter/followers","following_url":"https://api.github.com/users/samantharitter/following{/other_user}","gists_url":"https://api.github.com/users/samantharitter/gists{/gist_id}","starred_url":"https://api.github.com/users/samantharitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samantharitter/subscriptions","organizations_url":"https://api.github.com/users/samantharitter/orgs","repos_url":"https://api.github.com/users/samantharitter/repos","events_url":"https://api.github.com/users/samantharitter/events{/privacy}","received_events_url":"https://api.github.com/users/samantharitter/received_events","type":"User","site_admin":false},"body":"As below, I believe this is fine","created_at":"2015-03-17T15:11:23Z","updated_at":"2015-03-17T15:11:23Z","html_url":"https://github.com/mongodb/mongo-c-driver/pull/196#discussion_r26581030","pull_request_url":"https://api.github.com/repos/mongodb/mongo-c-driver/pulls/196","_links":{"self":{"href":"https://api.github.com/repos/mongodb/mongo-c-driver/pulls/comments/26581030"},"html":{"href":"https://github.com/mongodb/mongo-c-driver/pull/196#discussion_r26581030"},"pull_request":{"href":"https://api.github.com/repos/mongodb/mongo-c-driver/pulls/196"}}},"pull_request":{"url":"https://api.github.com/repos/mongodb/mongo-c-driver/pulls/196","id":31134199,"html_url":"https://github.com/mongodb/mongo-c-driver/pull/196","diff_url":"https://github.com/mongodb/mongo-c-driver/pull/196.diff","patch_url":"https://github.com/mongodb/mongo-c-driver/pull/196.patch","issue_url":"https://api.github.com/repos/mongodb/mongo-c-driver/issues/196","number":196,"state":"open","locked":false,"title":"CDRIVER-567 deprecate get_max_* methods on client","user":{"login":"samantharitter","id":1824529,"avatar_url":"https://avatars.githubusercontent.com/u/1824529?v=3","gravatar_id":"","url":"https://api.github.com/users/samantharitter","html_url":"https://github.com/samantharitter","followers_url":"https://api.github.com/users/samantharitter/followers","following_url":"https://api.github.com/users/samantharitter/following{/other_user}","gists_url":"https://api.github.com/users/samantharitter/gists{/gist_id}","starred_url":"https://api.github.com/users/samantharitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samantharitter/subscriptions","organizations_url":"https://api.github.com/users/samantharitter/orgs","repos_url":"https://api.github.com/users/samantharitter/repos","events_url":"https://api.github.com/users/samantharitter/events{/privacy}","received_events_url":"https://api.github.com/users/samantharitter/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-13T15:14:03Z","updated_at":"2015-03-17T15:11:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58c6e6ddf668be74463453f9b0eb7a90ab9b7547","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mongodb/mongo-c-driver/pulls/196/commits","review_comments_url":"https://api.github.com/repos/mongodb/mongo-c-driver/pulls/196/comments","review_comment_url":"https://api.github.com/repos/mongodb/mongo-c-driver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mongodb/mongo-c-driver/issues/196/comments","statuses_url":"https://api.github.com/repos/mongodb/mongo-c-driver/statuses/2b8e9590631c9eac77f45c7c044510e29f22e5a4","head":{"label":"samantharitter:CDRIVER-567","ref":"CDRIVER-567","sha":"2b8e9590631c9eac77f45c7c044510e29f22e5a4","user":{"login":"samantharitter","id":1824529,"avatar_url":"https://avatars.githubusercontent.com/u/1824529?v=3","gravatar_id":"","url":"https://api.github.com/users/samantharitter","html_url":"https://github.com/samantharitter","followers_url":"https://api.github.com/users/samantharitter/followers","following_url":"https://api.github.com/users/samantharitter/following{/other_user}","gists_url":"https://api.github.com/users/samantharitter/gists{/gist_id}","starred_url":"https://api.github.com/users/samantharitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samantharitter/subscriptions","organizations_url":"https://api.github.com/users/samantharitter/orgs","repos_url":"https://api.github.com/users/samantharitter/repos","events_url":"https://api.github.com/users/samantharitter/events{/privacy}","received_events_url":"https://api.github.com/users/samantharitter/received_events","type":"User","site_admin":false},"repo":{"id":22432488,"name":"mongo-c-driver","full_name":"samantharitter/mongo-c-driver","owner":{"login":"samantharitter","id":1824529,"avatar_url":"https://avatars.githubusercontent.com/u/1824529?v=3","gravatar_id":"","url":"https://api.github.com/users/samantharitter","html_url":"https://github.com/samantharitter","followers_url":"https://api.github.com/users/samantharitter/followers","following_url":"https://api.github.com/users/samantharitter/following{/other_user}","gists_url":"https://api.github.com/users/samantharitter/gists{/gist_id}","starred_url":"https://api.github.com/users/samantharitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samantharitter/subscriptions","organizations_url":"https://api.github.com/users/samantharitter/orgs","repos_url":"https://api.github.com/users/samantharitter/repos","events_url":"https://api.github.com/users/samantharitter/events{/privacy}","received_events_url":"https://api.github.com/users/samantharitter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samantharitter/mongo-c-driver","description":"A high-performance MongoDB driver for C","fork":true,"url":"https://api.github.com/repos/samantharitter/mongo-c-driver","forks_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/forks","keys_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/teams","hooks_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/hooks","issue_events_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/issues/events{/number}","events_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/events","assignees_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/assignees{/user}","branches_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/branches{/branch}","tags_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/tags","blobs_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/languages","stargazers_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/stargazers","contributors_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/contributors","subscribers_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/subscribers","subscription_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/subscription","commits_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/contents/{+path}","compare_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/merges","archive_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/downloads","issues_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/issues{/number}","pulls_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/labels{/name}","releases_url":"https://api.github.com/repos/samantharitter/mongo-c-driver/releases{/id}","created_at":"2014-07-30T15:02:25Z","updated_at":"2014-07-21T07:50:09Z","pushed_at":"2015-03-16T19:43:03Z","git_url":"git://github.com/samantharitter/mongo-c-driver.git","ssh_url":"git@github.com:samantharitter/mongo-c-driver.git","clone_url":"https://github.com/samantharitter/mongo-c-driver.git","svn_url":"https://github.com/samantharitter/mongo-c-driver","homepage":"","size":10614,"stargazers_count":0,"watchers_count":0,"language":null,"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":"mongodb:1.2.0-dev","ref":"1.2.0-dev","sha":"4c0720e3129fca1f20f6b719228320b07101e421","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":9735077,"name":"mongo-c-driver","full_name":"mongodb/mongo-c-driver","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/mongo-c-driver","description":"A high-performance MongoDB driver for C","fork":false,"url":"https://api.github.com/repos/mongodb/mongo-c-driver","forks_url":"https://api.github.com/repos/mongodb/mongo-c-driver/forks","keys_url":"https://api.github.com/repos/mongodb/mongo-c-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb/mongo-c-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb/mongo-c-driver/teams","hooks_url":"https://api.github.com/repos/mongodb/mongo-c-driver/hooks","issue_events_url":"https://api.github.com/repos/mongodb/mongo-c-driver/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb/mongo-c-driver/events","assignees_url":"https://api.github.com/repos/mongodb/mongo-c-driver/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb/mongo-c-driver/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb/mongo-c-driver/tags","blobs_url":"https://api.github.com/repos/mongodb/mongo-c-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb/mongo-c-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb/mongo-c-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb/mongo-c-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb/mongo-c-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb/mongo-c-driver/languages","stargazers_url":"https://api.github.com/repos/mongodb/mongo-c-driver/stargazers","contributors_url":"https://api.github.com/repos/mongodb/mongo-c-driver/contributors","subscribers_url":"https://api.github.com/repos/mongodb/mongo-c-driver/subscribers","subscription_url":"https://api.github.com/repos/mongodb/mongo-c-driver/subscription","commits_url":"https://api.github.com/repos/mongodb/mongo-c-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb/mongo-c-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb/mongo-c-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb/mongo-c-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb/mongo-c-driver/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb/mongo-c-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb/mongo-c-driver/merges","archive_url":"https://api.github.com/repos/mongodb/mongo-c-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb/mongo-c-driver/downloads","issues_url":"https://api.github.com/repos/mongodb/mongo-c-driver/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb/mongo-c-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb/mongo-c-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb/mongo-c-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb/mongo-c-driver/labels{/name}","releases_url":"https://api.github.com/repos/mongodb/mongo-c-driver/releases{/id}","created_at":"2013-04-28T19:34:36Z","updated_at":"2015-03-17T12:53:21Z","pushed_at":"2015-03-16T20:03:16Z","git_url":"git://github.com/mongodb/mongo-c-driver.git","ssh_url":"git@github.com:mongodb/mongo-c-driver.git","clone_url":"https://github.com/mongodb/mongo-c-driver.git","svn_url":"https://github.com/mongodb/mongo-c-driver","homepage":"","size":17435,"stargazers_count":105,"watchers_count":105,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":12,"forks":85,"open_issues":12,"watchers":105,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mongodb/mongo-c-driver/pulls/196"},"html":{"href":"https://github.com/mongodb/mongo-c-driver/pull/196"},"issue":{"href":"https://api.github.com/repos/mongodb/mongo-c-driver/issues/196"},"comments":{"href":"https://api.github.com/repos/mongodb/mongo-c-driver/issues/196/comments"},"review_comments":{"href":"https://api.github.com/repos/mongodb/mongo-c-driver/pulls/196/comments"},"review_comment":{"href":"https://api.github.com/repos/mongodb/mongo-c-driver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mongodb/mongo-c-driver/pulls/196/commits"},"statuses":{"href":"https://api.github.com/repos/mongodb/mongo-c-driver/statuses/2b8e9590631c9eac77f45c7c044510e29f22e5a4"}}}}