'A database named "test" is created in mongodb 4.0
{
"set" : "rs0",
"date" : ISODate("2022-03-02T02:22:19Z"),
"myState" : 1,
"members" : [
{
"_id" : 0,
"name" : "link:port",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"self" : true,
"uptime" : 6660018
},
{
"_id" : 1,
"name" : "link:port",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 6660018
},
{
"_id" : 2,
"name" : "link:port",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 6660018
}
],
"ok" : 1,
"operationTime" : Timestamp(1646187739, 1)
}
Database and collection configuration
The environment that is experiencing the problem now consists of a database, a replica set, and a shard as above.
There were no human errors in the backend App. and, The source code for creating a database named test did not exist. But nevertheless, a database named "test" is still created automatically.
I wonder why such a database is created if it is a function for the operation of sharding or replica set.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
