mongoc_read_prefs_set_hedge(3)

mongoc_read_prefs_set_hedge3

Usage

void
mongoc_read_prefs_set_hedge (mongoc_read_prefs_t *read_prefs,
                             const bson_t *hedge);

Parameters

•

read_prefs: A mongoc_read_prefs_t.

•

hedge: A bson_t.

Overview

Sets the hedge document to be used for the read preference. Sharded clusters running MongoDB 4.4 or later can dispatch read operations in parallel, returning the result from the fastest host and cancelling the unfinished operations.

For example, this is a valid hedge document

{
   enabled: true
}

Appropriate values for the enabled key are true or false.

Releases

3 releases since Debian 11 (Bullseye); the text changed 2 times.

  1. 11
  2. 12
  3. 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.