mongoc_client_reset(3)

mongoc_client_reset3

Usage

void
mongoc_client_reset (mongoc_client_t *client);

Call this method in the child after forking to invalidate the mongoc_client_t.

Overview

Calling mongoc_client_reset() prevents resource cleanup in the child process from interfering with the parent process.

This method causes the client to clear its session pool without sending endSessions. It also increments an internal generation counter on the given client. After this method is called, cursors from previous generations will not issue a killCursors command when they are destroyed. Client sessions from previous generations cannot be used and should be destroyed.

Parameters

•

client: A mongoc_client_t.

Releases

4 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11
  3. 12
  4. 13

Author

MongoDB, Inc

From libmongoc-doc 1.30.4-1+deb13u3 in Debian 13 (Trixie). Parsed by carta from the page's man source.