follow the example on the Internet to write that you can"t roll back?
db.col.find ()
{"_ id": ObjectId ("5b845237d63ff6fb1220861c"), "name": "ccy"}
{"_ id": ObjectId ("5b8453f5cf6edbf8ffc60a95"), "name": "ssy"}
{"_ id": ObjectId ("5b8456dcf580719bba707dc1"), "name": "ccc"}
s = db.getMongo (). StartSession ()
session {"id": UUID ("33f4e714-a59d-4e83-8750-011bb0b9d637")}
s.startTransaction ()
db.col.insert ({name: "mongo"})
WriteResult ({"nInserted": 1})
s.abortTransaction ()
db.col.find ()
{"_ id": ObjectId ("5b845237d63ff6fb1220861c"), "name": "ccy"}
{"_ id": ObjectId ("5b8453f5cf6edbf8ffc60a95"), "name": "ssy"}
{"_ id": ObjectId ("5b8456dcf580719bba707dc1"), "name": "ccc"}
{"_ id": ObjectId ("5b8458e726a5a62d9970c900"), "name": "mongo"}
as shown in the figure, a transaction is opened, a day"s data is inserted, and the transaction is rolled back. But the data is still plugged in?
ask the god why