MONGOC_READ_P...LENESS_SECONDS(3)

πŸ¦‹ MONGOC_READ_P...LENESS_SECONDS(3) β€” libmongoc πŸ¦‹

okay so bestie, this is the libmongoc page for setting the max staleness seconds on a read preference. tiny signature, very main character energy. πŸ’…

✨ SYNOPSIS ✨

here's the exact function signature β€” copy it exactly, no freestyling:

void
mongoc_read_prefs_set_max_staleness_seconds (mongoc_read_prefs_t *read_prefs,
                                             int64_t max_staleness_seconds);

πŸŽ€ PARAMETERS πŸŽ€

  • read_prefs β€” a mongoc_read_prefs_t. that's the read-prefs object you're updating, bestie.
  • max_staleness_seconds β€” a positive integer or MONGOC_NO_MAX_STALENESS. periodt.

πŸ’– DESCRIPTION πŸ’–

Sets the maxStalenessSeconds to be used for the read preference. literally the whole point. ✨

Clients estimate the staleness of each secondary, and select for reads only those secondaries whose estimated staleness is less than or equal to maxStalenessSeconds. no cap β€” that's the rule. πŸ’…

🌈 AUTHOR 🌈

MongoDB, Inc

2009-present, MongoDB, Inc.

πŸ’– okay bye bestie β€” this was libmongoc version 2.5.6, dated Oct 09, 2026. slay and stay staleness-aware. 🫢

πŸ“¦ where this page comes from