mongoc_read_prefs_set_hedge - Man Page

mongoc_read_prefs_set_hedge()

Synopsis

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

Parameters

Description

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.

Author

MongoDB, Inc

Info

Feb 04, 2021 1.17.4 libmongoc