[DOCS-464] the differences between shardconnection & scopeddbconnection? Created: 30/Aug/12 Updated: 30/Oct/23 Resolved: 31/Aug/12 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | mongodb-2.2 |
| Fix Version/s: | Server_Docs_20231030 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | maxun | Assignee: | Spencer Brody (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | mongos, scourcecode | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
centos |
||
| Participants: | |
| Days since reply: | 11 years, 24 weeks, 6 days ago |
| Description |
|
i'm reading the soucrecode to figure out how mongodb works.i wonder what's the differences between shardconnection and scopeddbconnection , it seems that they get connection from different dbconnectionpools. |
| Comments |
| Comment by maxun [ 31/Aug/12 ] |
|
thanks for your reply.it helps a lot. |
| Comment by Spencer Brody (Inactive) [ 30/Aug/12 ] |
|
The main difference is that ShardConnections maintain versioning information so it can properly handle chunk migrations. ShardConnections are what the mongos mainly uses for running queries on the shards. ScopedDbConnections don't keep versioning information, so they are more used for internal operations within the cluster (replication, admin commands, talking to the config servers, etc.) that don't involve querying sharded collections.. |