Docs Menu

Hedged Read Option

重要

MongoDB 8.0以降、ヘッジされた読み取りは非推奨です。 読み込み設定(read preference nearestを指定するクエリは、デフォルトでヘッジされた読み取りを使用しなくなりました。 ヘッジされた読み取りを明示的に指定すると、MongoDB はヘッジされた読み取りを実行し、警告をログに記録します。

You can specify the use of hedged reads for non-primary read preferences on sharded clusters.

With hedged reads, the mongos instances can route read operations to two replica set members per each queried shard and return results from the first respondent per shard.

ヘッジされた読み取りは、以下の操作でサポートされています。

To specify hedged read for a read preference, use the hedged read option for read preferences.

To use hedged reads, enable the hedge read option for non-primary read preferences.

For more information on hedged reads, see ヘッジされた読み取り.

For details on member selection for hedged reads, see 読み込み設定(read preference)とシャード.

コマンドserverStatusとそれに対応するmongoshメソッドdb.serverStatus()hedgingMetricsを返します。