File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -71,10 +71,15 @@ func WithTagSets(tagSets ...tag.Set) Option {
71
71
}
72
72
}
73
73
74
- // WithHedgeEnabled specifies whether or not hedged reads should be enabled in the server. This feature requires MongoDB
75
- // server version 4.4 or higher. For more information about hedged reads, see
76
- // https://www.mongodb.com/docs/manual/core/sharded-cluster-query-router/#mongos-hedged-reads. If not specified, the default
77
- // is to not send a value to the server, which will result in the server defaults being used.
74
+ // WithHedgeEnabled specifies whether or not hedged reads should be enabled in
75
+ // the server. This feature requires MongoDB server version 4.4 or higher. For
76
+ // more information about hedged reads, see
77
+ // https://www.mongodb.com/docs/manual/core/sharded-cluster-query-router/#mongos-hedged-reads.
78
+ // If not specified, the default is to not send a value to the server, which
79
+ // will result in the server defaults being used.
80
+ //
81
+ // Deprecated: Hedged reads are deprecated in MongoDB 8.0 and may be removed in
82
+ // a future MongoDB version.
78
83
func WithHedgeEnabled (hedgeEnabled bool ) Option {
79
84
return func (rp * ReadPref ) error {
80
85
rp .hedgeEnabled = & hedgeEnabled
Original file line number Diff line number Diff line change @@ -103,8 +103,12 @@ func (r *ReadPref) TagSets() []tag.Set {
103
103
return r .tagSets
104
104
}
105
105
106
- // HedgeEnabled returns whether or not hedged reads are enabled for this read preference. If this option was not
107
- // specified during read preference construction, nil is returned.
106
+ // HedgeEnabled returns whether or not hedged reads are enabled for this read
107
+ // preference. If this option was not specified during read preference
108
+ // construction, nil is returned.
109
+ //
110
+ // Deprecated: Hedged reads are deprecated in MongoDB 8.0 and may be removed in
111
+ // a future MongoDB version.
108
112
func (r * ReadPref ) HedgeEnabled () * bool {
109
113
return r .hedgeEnabled
110
114
}
You can’t perform that action at this time.
0 commit comments