MongoDb 4.0.3 Mongo Shell Prints "implicit session"

2,336 views
Skip to first unread message

Robert Cochran

unread,
Oct 9, 2018, 7:35:01 PM10/9/18
to mongodb-user
Hi!

I just now upgraded to MongoDB Enterprise version 4.0.3, running on Ubuntu 18.04.1 LTS with all current operating system updates applied and a `uname -a' output of

Linux entmdb4 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux.

When I start the mongo shell, there is a reference to an implicit session:

MongoDB shell version v4.0.3

connecting to: mongodb://127.0.0.1:27017

Implicit session: session { "id" : UUID("2ac317e9-9ecf-4984-afdd-b3c40dfc3412") }

MongoDB server version: 4.0.3



I have not noticed that 'Implicit session' line in 4.0.2. 

Is this change something new? I checked the 4.0.3 changelog and see no mention of implicit sessions being printed by the mongo shell. As a note, I'm running this server in a vagrant box and the last time I started mongod with systemctl, I forgot to shut it down with systemctl before halting the the box with the command 'vagrant halt'. I do think powering down a running virtual machine in this way would have caused running processes to be gracefully stopped first.

Thanks so much

Bob

Wan Bachtiar

unread,
Oct 9, 2018, 9:59:29 PM10/9/18
to mongodb-user

Is this change something new? I checked the 4.0.3 changelog and see no mention of implicit sessions being printed by the mongo shell.

Hi Bob,

This is part of the work tracked under SERVER-33606.

The implicit session itself is not new in version 4.0.3. What you noticed is the change to make it more transparent to mongo shell users about the implicit session ID used by mongo shell. This is relating to mongo shell startSession() to fail if the server doesn’t support logical sessions.

An implicit session is one started implicitly by mongo shell, because it calls an operation without providing an explicit session. 

Regards,
Wan.

Reply all
Reply to author
Forward
0 new messages