[SERVER-26546] Use unsharded collections in mongodb shard Created: 10/Oct/16  Updated: 06/Jan/17  Resolved: 06/Jan/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.2.10
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: hunter Assignee: Kelsey Schubert
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File 11.png     PNG File 2222.png     PNG File 33333.png    
Participants:

 Description   

We use the mongodb shard cluster, event collections use unsharded. But now the event collections in multiple nodes, why the number of nodes, not only in the primary shard

mongos:

{ "_id" : "event", "primary" : "node02", "partitioned" : false }

node01:PRIMARY> show dbs;
account 0.000GB
admin 0.000GB
alliance 0.000GB
battle 0.001GB
cache 0.000GB
cheating 0.000GB
chest 0.000GB
common 0.001GB
event 0.000GB
guide 0.000GB
local 0.024GB
mail 0.000GB
message 0.000GB
mission 0.000GB
pve 0.000GB
pvp 0.000GB
reward 0.000GB
statistic 0.000GB
store 0.000GB
node01:PRIMARY> show tables;
iap_display
platinum_shop
special_offer
special_offer_count
special_offer_refresh_count
store_refresh_count
supply_drop

node02:PRIMARY> show dbs;
account 0.000GB
admin 0.000GB
alliance 0.001GB
battle 0.001GB
cache 0.000GB
cheating 0.000GB
chest 0.000GB
common 0.001GB
event 0.000GB
fang 0.000GB
guide 0.000GB
local 0.016GB
log 0.001GB
mail 0.000GB
message 0.000GB
mission 0.000GB
payment 0.000GB
pve 0.001GB
pvp 0.001GB
reward 0.000GB
statistic 0.000GB
store 0.001GB
test_demo 0.000GB
node02:PRIMARY> show tables
platinum_shop
special_offer
special_offer_refresh_count
store_refresh_count
supply_drop



 Comments   
Comment by Kelsey Schubert [ 06/Jan/17 ]

Hi poorgreatly,

We haven’t heard back from you for some time, so I’m going to mark this ticket as resolved. Unfortunately, without additional information about how to reproduce this behavior, it's very challenging to understand what occurred. If you are able to reproduce this issue or encounter it again and can provide additional details about the circumstances that cause this issue, we will reopen this ticket and continue to investigate.

Kind regards,
Thomas

Comment by Kelsey Schubert [ 02/Dec/16 ]

Hi poorgreatly,

Sorry for the delay getting back to you. Unfortunately, we have not been able to identify the cause of this behavior. Is this still an issue for you? Have you observed this issue since then?

Thank you,
Thomas

Comment by hunter [ 12/Oct/16 ]

hi Thomas Schubert,
Event database, log database, fang database. These databases are not set shard, before the 10th

Sorry, forgot to tell you to set shard, after 10

Comment by hunter [ 12/Oct/16 ]

hi Thomas Schubert,
At present, I also found that php read data, sometimes read to, and sometimes can not read, there is actually data.

Comment by hunter [ 12/Oct/16 ]

hi Thomas Schubert,
You look under the 10 before the log, event database, log database, fang database, I found a problem, all the collections are done shard

Comment by hunter [ 12/Oct/16 ]

hi Thomas Schubert,
Event collections Yesterday I just added, because there are problems encountered before the said.

Comment by Kelsey Schubert [ 12/Oct/16 ]

Hi poorgreatly,

Thank you for providing the logs. I see the following log messages mongos_01:

mongos.log:2016-10-10T13:34:05.647+0000 I ACCESS   [conn2485] Successfully authenticated as principal ADMIN on admin
mongos.log:2016-10-10T13:34:05.656+0000 I SHARDING [conn2485] distributed lock 'event' acquired for 'enableSharding', ts : 57fb98cda73698c225dfd0c0
mongos.log:2016-10-10T13:34:05.674+0000 I SHARDING [conn2485] Placing [event] on: node02
mongos.log:2016-10-10T13:34:05.674+0000 I SHARDING [conn2485] Enabling sharding for database [event] in config db
mongos.log:2016-10-10T13:34:05.681+0000 I SHARDING [conn2485] distributed lock with ts: 57fb98cda73698c225dfd0c0' unlocked.
mongos.log:2016-10-10T13:34:05.720+0000 I COMMAND  [conn2485] CMD: shardcollection: { shardCollection: "event.seven_day_sign", key: { index_id: "hashed" } }

This indicates that the collections in the event database are sharded. Would you please investigate whether this command explains the behavior that you observe?

Thank you,
Thomas

Comment by hunter [ 12/Oct/16 ]

hi Thomas Schubert,
Thanks,I already upload mongos ,config server,shard's primary node log

Comment by Kelsey Schubert [ 12/Oct/16 ]

Hi poorgreatly,

Thanks for clarifying that you haven't executed movePrimary. So we can get a better idea of what is going on here, would you please provide the logs that I requested?

  • Log of a mongos
  • Log of the primary config server (or first config server if SCCC)
  • Logs of each shard's primary node

I've created a secure upload portal for you to use. Files uploaded to this portal are only visible to MongoDB employees investigating this issue and are routinely deleted after some time.

Thanks again,
Thomas

Comment by hunter [ 12/Oct/16 ]

hi Thomas Schubert,
I have not executed movePrimary

Comment by Kelsey Schubert [ 11/Oct/16 ]

Hi poorgreatly,

Thank you for reporting this behavior. Have you executed movePrimary against this database? If so, would you please outline the steps you took?

To help us continue to investigate, would you please provide the complete logs of a mongos, the primary config server, and the primary of each shard?

Kind regards,
Thomas

Comment by hunter [ 11/Oct/16 ]

3.2.9 also have this problem

Generated at Thu Feb 08 04:12:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.