[SERVER-36954] server keeps trying to create an index on system.sessions Created: 31/Aug/18  Updated: 14/Oct/18  Resolved: 20/Sep/18

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

Type: Bug Priority: Major - P3
Reporter: Asya Kamsky Assignee: Misha Tyulenev
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-36964 Prevent secondaries in SessionsCollec... Closed
Related
related to SERVER-36961 createIndexes command should check if... Closed
Operating System: ALL
Participants:

 Description   

This feels very similar to SERVER-32521 which I filed a while back but now I'm on Atlas replica set (which was upgraded from 3.6 to 4.0) and I see every five minutes in the logs:

2018-08-31T00:09:09.665+0000 I COMMAND  [LogicalSessionCacheRefresh] command config.$cmd command: createIndexes { createIndexes: "system.sessions", indexes: [ { key: { lastUse: 1 }, name: "lsidTTLIndex", expireAfterSeconds: 1800 } ], $db: "config" } numYields:0 reslen:275 locks:{ Global: { acquireCount: { r: 2, w: 2 } }, Database: { acquireCount: { w: 1, W: 1 }, acquireWaitCount: { W: 1 }, timeAcquiringMicros: { W: 464030 } }, Collection: { acquireCount: { w: 1 } } } protocol:op_msg 464ms



 Comments   
Comment by Misha Tyulenev [ 20/Sep/18 ]

SERVER-36961 should fix the issue of the timeout. The other change that will reduce # of calls calls to createIndexes is SERVER-36964. Closing as a dup.

Comment by Asya Kamsky [ 31/Aug/18 ]

I checked and the index exists:

db.system.sessions.getIndexes()
[
	{
		"v" : 2,
		"key" : {
			"_id" : 1
		},
		"name" : "_id_",
		"ns" : "config.system.sessions"
	},
	{
		"v" : 2,
		"key" : {
			"lastUse" : 1
		},
		"name" : "lsidTTLIndex",
		"expireAfterSeconds" : 1800,
		"ns" : "config.system.sessions"
	}
]
 

And yet every five minutes:

2018-08-31T13:09:09.189+0000 I COMMAND  [LogicalSessionCacheReap] command config.$cmd command: createIndexes { createIndexes: "system.sessions", indexes: [ { key: { lastUse: 1 }, name: "lsidTTLIndex", expireAfterSeconds: 1800 } ], $db: "config" } numYields:0 reslen:275 locks:{ Global: { acquireCount: { r: 2, w: 2 } }, Database: { acquireCount: { w: 1, W: 1 } }, Collection: { acquireCount: { w: 1 } } } protocol:op_msg 0ms
2018-08-31T13:09:09.189+0000 I COMMAND  [LogicalSessionCacheReap] command config.transactions command: find { find: "transactions", filter: { lastWriteDate: { $lt: new Date(1535719149189) } }, projection: { _id: 1 }, sort: { _id: 1 }, $db: "config" } planSummary: IXSCAN { _id: 1 } keysExamined:0 docsExamined:0 cursorExhausted:1 numYields:0 nreturned:0 reslen:233 locks:{ Global: { acquireCount: { r: 5, w: 2 } }, Database: { acquireCount: { r: 2, w: 1, W: 1 } }, Collection: { acquireCount: { r: 2, w: 1 } } }
2018-08-31T13:09:09.201+0000 I COMMAND  [LogicalSessionCacheRefresh] command config.$cmd command: createIndexes { createIndexes: "system.sessions", indexes: [ { key: { lastUse: 1 }, name: "lsidTTLIndex", expireAfterSeconds: 1800 } ], $db: "config" } numYields:0 reslen:275 locks:{ Global: { acquireCount: { r: 2, w: 2 } }, Database: { acquireCount: { w: 1, W: 1 } }, Collection: { acquireCount: { w: 1 } } } protocol:op_msg 0ms

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