1. 插入两条相同的数据 db.user.insertOne({ name:"test", age:30, }) 2. 创建索引 db.user.createIndex({name:1},{unique: true}); 3. 报错