# Copyright (C) 2018-present MongoDB, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the Server Side Public License, version 1, # as published by MongoDB, Inc. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # Server Side Public License for more details. # # You should have received a copy of the Server Side Public License # along with this program. If not, see # . # # As a special exception, the copyright holders give permission to link the # code of portions of this program with the OpenSSL library under certain # conditions as described in each individual source file and distribute # linked combinations including the program with the OpenSSL library. You # must comply with the Server Side Public License in all respects for # all of the code used other than as permitted herein. If you modify file(s) # with this exception, you may extend this exception to your version of the # file(s), but you are not obligated to do so. If you do not wish to do so, # delete this exception statement from your version. If you delete this # exception statement from all source files in the program, then also delete # it in the license file. # # This IDL file describes the BSON format for a LogicalSessionId, and # handles the serialization to and deserialization from its BSON representation # for that class. global: cpp_namespace: "mongo" cpp_includes: - "mongo/util/uuid.h" imports: - "mongo/idl/basic_types.idl" - "mongo/crypto/sha256_block.idl" types: TxnNumber: description: "A strictly-increasing per-session counter, which indicates to which transaction of a given session does the specified command belong. The combination of LogicalSessionId:TxnNumber is referred to as the transaction identifier." bson_serialization_type: long cpp_type: "std::int64_t" deserializer: "mongo::BSONElement::_numberLong" StmtId: description: "A number representing an operation within a transaction." bson_serialization_type: int cpp_type: "std::int32_t" deserializer: "mongo::BSONElement::_numberInt" structs: LogicalSessionId: description: "A struct representing a LogicalSessionId" strict: true fields: id: uuid uid: sha256Block LogicalSessionIdToClient: description: "A struct representing a LogicalSessionId to external clients" strict: true fields: id: uuid LogicalSessionToClient: description: "A struct representing a LogicalSession reply to external clients" strict: true fields: id: LogicalSessionIdToClient timeoutMinutes: int LogicalSessionRecord: description: "A struct representing a LogicalSessionRecord" strict: true fields: _id: type: LogicalSessionId cpp_name: id lastUse: date user: type: string optional: true LogicalSessionFromClient: description: "A struct representing a LogicalSessionId from external clients" strict: true fields: id: uuid uid: type: sha256Block optional: true OperationSessionInfo: description: "Parser for serializing sessionId/txnNumber combination" strict: false fields: lsid: type: LogicalSessionId cpp_name: sessionId optional: true txnNumber: description: "The transaction number relative to the session in which a particular write operation executes." type: TxnNumber optional: true OperationSessionInfoFromClient: description: "Parser for pulling out the sessionId/txnNumber combination from commands" strict: false fields: lsid: type: LogicalSessionFromClient cpp_name: sessionId optional: true txnNumber: description: "The transaction number relative to the session in which a particular write operation executes." type: TxnNumber optional: true autocommit: type: bool optional: true startTransaction: description: "Used to indicate that a command is the start of a multi-statement transaction." type: bool optional: true coordinator: description: "Indicates that this shard is the coordinator shard for the transaction two-phase commit." type: bool optional: true SessionsCollectionFetchResultIndividualResult: description: "Individual result" strict: true fields: _id: LogicalSessionId SessionsCollectionFetchResultCursor: description: "Cursor object" strict: false fields: firstBatch: array SessionsCollectionFetchResult: description: "Parser for pulling out the fetch results from SessionsCollection::fetch" strict: false fields: cursor: SessionsCollectionFetchResultCursor SessionsCollectionFetchRequestFilterId: description: "Id" strict: true fields: $in: type: array cpp_name: "in" SessionsCollectionFetchRequestFilter: description: "filter" strict: true fields: _id: SessionsCollectionFetchRequestFilterId SessionsCollectionFetchRequestProjection: description: "projection" strict: true fields: _id: int SessionsCollectionFetchRequest: description: "Parser for forming the fetch request for SessionsCollection::fetch" strict: true fields: find: string filter: SessionsCollectionFetchRequestFilter projection: SessionsCollectionFetchRequestProjection batchSize: int singleBatch: bool limit: int server_parameters: localLogicalSessionTimeoutMinutes: description: 'The time in minutes that a session remains active after its most recent use' set_at: [ startup ] cpp_vartype: int cpp_varname: localLogicalSessionTimeoutMinutes default: 30