|
Hi pj-martin@outlook.fr, I am unable to reproduce this issue:
MongoDB Enterprise SERVER-62420:PRIMARY> show dbs
|
admin 0.000GB
|
config 0.000GB
|
local 0.003GB
|
test 0.000GB
|
MongoDB Enterprise SERVER-62420:PRIMARY> use test
|
switched to db test
|
MongoDB Enterprise SERVER-62420:PRIMARY> db.setProfilingLevel(2)
|
{
|
"was" : 0,
|
"slowms" : 100,
|
"sampleRate" : 1,
|
"ok" : 1,
|
"$clusterTime" : {
|
"clusterTime" : Timestamp(1643108825, 1),
|
"signature" : {
|
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
|
"keyId" : NumberLong(0)
|
}
|
},
|
"operationTime" : Timestamp(1643108825, 1)
|
}
|
MongoDB Enterprise SERVER-62420:PRIMARY> db.getProfilingStatus()
|
{
|
"was" : 2,
|
"slowms" : 100,
|
"sampleRate" : 1,
|
"$clusterTime" : {
|
"clusterTime" : Timestamp(1643108885, 1),
|
"signature" : {
|
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
|
"keyId" : NumberLong(0)
|
}
|
},
|
"operationTime" : Timestamp(1643108885, 1)
|
}
|
MongoDB Enterprise SERVER-62420:PRIMARY> db.eventlog.createIndex( { "lastModifiedDate": 1 }, { expireAfterSeconds: 30 } )
|
{
|
"numIndexesBefore" : 1,
|
"numIndexesAfter" : 2,
|
"createdCollectionAutomatically" : true,
|
"commitQuorum" : "votingMembers",
|
"ok" : 1,
|
"$clusterTime" : {
|
"clusterTime" : Timestamp(1643108932, 2),
|
"signature" : {
|
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
|
"keyId" : NumberLong(0)
|
}
|
},
|
"operationTime" : Timestamp(1643108932, 2)
|
}
|
MongoDB Enterprise SERVER-62420:PRIMARY> db.eventlog.insertOne({ lastModifiedDate: new Date() })
|
{
|
"acknowledged" : true,
|
"insertedId" : ObjectId("61efda57c69556b30de167c2")
|
}
|
MongoDB Enterprise SERVER-62420:PRIMARY> db.system.profile.find()
|
{ "op" : "command", "ns" : "test.eventlog", "command" : { "createIndexes" : "eventlog", "indexes" : [ { "key" : { "lastModifiedDate" : 1 }, "name" : "lastModifiedDate_1", "expireAfterSeconds" : 30 } ], "lsid" : { "id" : UUID("52b245af-6931-4b34-96bb-a45525ce064c") }, "$clusterTime" : { "clusterTime" : Timestamp(1643108885, 1), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) } }, "$db" : "test" }, "numYield" : 0, "locks" : { "ParallelBatchWriterMode" : { "acquireCount" : { "r" : NumberLong(4) } }, "ReplicationStateTransition" : { "acquireCount" : { "w" : NumberLong(4) } }, "Global" : { "acquireCount" : { "r" : NumberLong(3), "w" : NumberLong(1) } }, "Database" : { "acquireCount" : { "r" : NumberLong(3), "w" : NumberLong(1) } }, "Collection" : { "acquireCount" : { "r" : NumberLong(2), "w" : NumberLong(1) } }, "Mutex" : { "acquireCount" : { "r" : NumberLong(4) } } }, "flowControl" : { }, "responseLength" : 271, "protocol" : "op_msg", "millis" : 13, "ts" : ISODate("2022-01-25T11:08:52.932Z"), "client" : "127.0.0.1", "appName" : "MongoDB Shell", "allUsers" : [ ], "user" : "" }
|
{ "op" : "insert", "ns" : "test.eventlog", "command" : { "insert" : "eventlog", "ordered" : true, "lsid" : { "id" : UUID("52b245af-6931-4b34-96bb-a45525ce064c") }, "$clusterTime" : { "clusterTime" : Timestamp(1643108932, 2), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) } }, "$db" : "test" }, "ninserted" : 1, "keysInserted" : 2, "numYield" : 0, "locks" : { "ParallelBatchWriterMode" : { "acquireCount" : { "r" : NumberLong(1) } }, "ReplicationStateTransition" : { "acquireCount" : { "w" : NumberLong(1) } }, "Global" : { "acquireCount" : { "w" : NumberLong(1) } }, "Database" : { "acquireCount" : { "w" : NumberLong(1) } }, "Collection" : { "acquireCount" : { "w" : NumberLong(1) } }, "Mutex" : { "acquireCount" : { "r" : NumberLong(1) } } }, "flowControl" : { "acquireCount" : NumberLong(1), "timeAcquiringMicros" : NumberLong(1) }, "responseLength" : 230, "protocol" : "op_msg", "millis" : 0, "ts" : ISODate("2022-01-25T11:09:11.629Z"), "client" : "127.0.0.1", "appName" : "MongoDB Shell", "allUsers" : [ ], "user" : "" }
|
Can you run the same commands as I did and post the same output? Please also mention the MongoDB version used. In my example above, I was using 5.0.5.
|