/
server-sessions.txt
58 lines (40 loc) · 1.54 KB
/
server-sessions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
===============
Server Sessions
===============
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
.. versionadded:: 3.6
Overview
--------
MongoDB's server sessions, or logical sessions, are the underlying
framework used by :ref:`client sessions <3.6-client-sessions>` to
support :ref:`causal-consistency` and :ref:`retryable writes <retryable-writes>`.
.. important::
Applications use :ref:`client sessions <3.6-client-sessions>` to
interface with server sessions.
Server sessions are available for replica sets and sharded clusters only.
Command Options
---------------
.. include:: /includes/extracts/sessions-options.rst
Sessions Commands
-----------------
.. include:: /includes/extracts/sessions-commands.rst
Sessions and Access Control
---------------------------
If the deployment enforces authentication/authorization, the user must
be authenticated to start a session, and only that user can use the
session.
.. include:: /includes/extracts/sessions-external-username-limit.rst
If the deployment does not enforce authentication/authorization, a
created session has no owner and can be used by any user on any
connection. If a user authenticates and creates a session for a
deployment that does not enforce authentication/authorization, that user
owns the session. However, any user on any connection may use the
session.
If the deployment transitions to authentication without any downtime, any
sessions without an owner cannot be used.
.. seealso:: :parameter:`maxSessions`