Skip to content

Commit 36c32a2

Browse files
authored
MongoDB: document readonly properties and IWM URI options (#5496)
* MongoDB: document readonly properties * Document new manager options for Intelligent Workload Management
1 parent 840bdb9 commit 36c32a2

21 files changed

Lines changed: 1747 additions & 2 deletions

reference/mongodb/mongodb/driver/exception/bulkwriteexception.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
<!-- }}} -->
4343
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
4444
<fieldsynopsis>
45-
<modifier>protected</modifier>
45+
<modifier>public</modifier>
46+
<modifier>readonly</modifier>
4647
<type>MongoDB\Driver\WriteResult</type>
4748
<varname linkend="mongodb-driver-exception-bulkwriteexception.props.writeresult">writeResult</varname>
4849
</fieldsynopsis>
@@ -95,6 +96,13 @@
9596
</row>
9697
</thead>
9798
<tbody>
99+
<row>
100+
<entry>PECL mongodb 2.3.0</entry>
101+
<entry>
102+
The <varname>writeResult</varname> property is now
103+
<modifier>public</modifier> <modifier>readonly</modifier>.
104+
</entry>
105+
</row>
98106
<row>
99107
<entry>PECL mongodb 2.0.0</entry>
100108
<entry>

reference/mongodb/mongodb/driver/exception/commandexception.xml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
<!-- }}} -->
4343
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
4444
<fieldsynopsis>
45-
<modifier>protected</modifier>
45+
<modifier>public</modifier>
46+
<modifier>readonly</modifier>
4647
<type>object</type>
4748
<varname linkend="mongodb-driver-exception-commandexception.props.resultdocument">resultDocument</varname>
4849
</fieldsynopsis>
@@ -84,6 +85,29 @@
8485
</section>
8586
<!-- }}} -->
8687

88+
<section role="changelog">
89+
&reftitle.changelog;
90+
<informaltable>
91+
<tgroup cols="2">
92+
<thead>
93+
<row>
94+
<entry>&Version;</entry>
95+
<entry>&Description;</entry>
96+
</row>
97+
</thead>
98+
<tbody>
99+
<row>
100+
<entry>PECL mongodb 2.3.0</entry>
101+
<entry>
102+
The <varname>resultDocument</varname> property is now
103+
<modifier>public</modifier> <modifier>readonly</modifier>.
104+
</entry>
105+
</row>
106+
</tbody>
107+
</tgroup>
108+
</informaltable>
109+
</section>
110+
87111
</partintro>
88112

89113
&reference.mongodb.mongodb.driver.exception.entities.commandexception;

reference/mongodb/mongodb/driver/manager/construct.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,16 @@ mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][
207207
</simpara>
208208
</entry>
209209
</row>
210+
<row>
211+
<entry>enableOverloadRetargeting</entry>
212+
<entry><type>bool</type></entry>
213+
<entry>
214+
<simpara>
215+
When set to &true; it forces server selection after a
216+
<literal>SystemOverloadedError</literal>. Defaults to &false;.
217+
</simpara>
218+
</entry>
219+
</row>
210220
<row>
211221
<entry>heartbeatFrequencyMS</entry>
212222
<entry><type>int</type></entry>
@@ -262,6 +272,17 @@ mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][
262272
</simpara>
263273
</entry>
264274
</row>
275+
<row>
276+
<entry>maxAdaptiveRetries</entry>
277+
<entry><type>int</type></entry>
278+
<entry>
279+
<simpara>
280+
This option can be used to change the maximum number of retries
281+
when a <literal>SystemOverloadedError</literal> occurs. Must be a
282+
positive integer; defaults to <literal>2</literal>.
283+
</simpara>
284+
</entry>
285+
</row>
265286
<row>
266287
<entry>maxStalenessSeconds</entry>
267288
<entry><type>int</type></entry>

reference/mongodb/mongodb/driver/monitoring/commandfailedevent.xml

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,196 @@
3434
</classsynopsisinfo>
3535
<!-- }}} -->
3636

37+
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
38+
<fieldsynopsis>
39+
<modifier>public</modifier>
40+
<modifier>readonly</modifier>
41+
<type>string</type>
42+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.host">host</varname>
43+
</fieldsynopsis>
44+
<fieldsynopsis>
45+
<modifier>public</modifier>
46+
<modifier>readonly</modifier>
47+
<type>int</type>
48+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.port">port</varname>
49+
</fieldsynopsis>
50+
<fieldsynopsis>
51+
<modifier>public</modifier>
52+
<modifier>readonly</modifier>
53+
<type>string</type>
54+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.commandname">commandName</varname>
55+
</fieldsynopsis>
56+
<fieldsynopsis>
57+
<modifier>public</modifier>
58+
<modifier>readonly</modifier>
59+
<type>string</type>
60+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.databasename">databaseName</varname>
61+
</fieldsynopsis>
62+
<fieldsynopsis>
63+
<modifier>public</modifier>
64+
<modifier>readonly</modifier>
65+
<type>int</type>
66+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.duration">duration</varname>
67+
</fieldsynopsis>
68+
<fieldsynopsis>
69+
<modifier>public</modifier>
70+
<modifier>readonly</modifier>
71+
<type>Exception</type>
72+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.error">error</varname>
73+
</fieldsynopsis>
74+
<fieldsynopsis>
75+
<modifier>public</modifier>
76+
<modifier>readonly</modifier>
77+
<type>object</type>
78+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.reply">reply</varname>
79+
</fieldsynopsis>
80+
<fieldsynopsis>
81+
<modifier>public</modifier>
82+
<modifier>readonly</modifier>
83+
<type>string</type>
84+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.operationid">operationId</varname>
85+
</fieldsynopsis>
86+
<fieldsynopsis>
87+
<modifier>public</modifier>
88+
<modifier>readonly</modifier>
89+
<type>string</type>
90+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.requestid">requestId</varname>
91+
</fieldsynopsis>
92+
<fieldsynopsis>
93+
<modifier>public</modifier>
94+
<modifier>readonly</modifier>
95+
<type class="union"><type>MongoDB\BSON\ObjectId</type><type>null</type></type>
96+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.serviceid">serviceId</varname>
97+
</fieldsynopsis>
98+
<fieldsynopsis>
99+
<modifier>public</modifier>
100+
<modifier>readonly</modifier>
101+
<type class="union"><type>int</type><type>null</type></type>
102+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.serverconnectionid">serverConnectionId</varname>
103+
</fieldsynopsis>
104+
37105
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
38106
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongodb-driver-monitoring-commandfailedevent')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
39107
</classsynopsis>
40108
<!-- }}} -->
41109

42110
</section>
43111

112+
<!-- {{{ MongoDB\Driver\Monitoring\CommandFailedEvent properties -->
113+
<section xml:id="mongodb-driver-monitoring-commandfailedevent.props">
114+
&reftitle.properties;
115+
<variablelist>
116+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.host">
117+
<term><varname>host</varname></term>
118+
<listitem>
119+
<simpara>The hostname of the server that executed the command.</simpara>
120+
</listitem>
121+
</varlistentry>
122+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.port">
123+
<term><varname>port</varname></term>
124+
<listitem>
125+
<simpara>The port of the server that executed the command.</simpara>
126+
</listitem>
127+
</varlistentry>
128+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.commandname">
129+
<term><varname>commandName</varname></term>
130+
<listitem>
131+
<simpara>The command name.</simpara>
132+
</listitem>
133+
</varlistentry>
134+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.databasename">
135+
<term><varname>databaseName</varname></term>
136+
<listitem>
137+
<simpara>The database name.</simpara>
138+
</listitem>
139+
</varlistentry>
140+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.duration">
141+
<term><varname>duration</varname></term>
142+
<listitem>
143+
<simpara>
144+
The duration of the command in microseconds. The duration is a
145+
calculated value that includes the time to send the message and
146+
receive the response from the server.
147+
</simpara>
148+
</listitem>
149+
</varlistentry>
150+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.error">
151+
<term><varname>error</varname></term>
152+
<listitem>
153+
<simpara>The exception that was thrown when the command failed.</simpara>
154+
</listitem>
155+
</varlistentry>
156+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.reply">
157+
<term><varname>reply</varname></term>
158+
<listitem>
159+
<simpara>The failure reply document returned by the server.</simpara>
160+
</listitem>
161+
</varlistentry>
162+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.operationid">
163+
<term><varname>operationId</varname></term>
164+
<listitem>
165+
<simpara>
166+
The operation ID. This may be used to link events together such as
167+
bulk writes, which may dispatch multiple commands.
168+
</simpara>
169+
</listitem>
170+
</varlistentry>
171+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.requestid">
172+
<term><varname>requestId</varname></term>
173+
<listitem>
174+
<simpara>
175+
The request ID. This may be used to associate this
176+
<classname>MongoDB\Driver\Monitoring\CommandFailedEvent</classname>
177+
with a corresponding
178+
<classname>MongoDB\Driver\Monitoring\CommandStartedEvent</classname>.
179+
</simpara>
180+
</listitem>
181+
</varlistentry>
182+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.serviceid">
183+
<term><varname>serviceId</varname></term>
184+
<listitem>
185+
<simpara>
186+
The service ID, or &null; if the server does not support it (i.e.
187+
not using load-balanced mode).
188+
</simpara>
189+
</listitem>
190+
</varlistentry>
191+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.serverconnectionid">
192+
<term><varname>serverConnectionId</varname></term>
193+
<listitem>
194+
<simpara>
195+
The server connection ID, or &null; if not available.
196+
</simpara>
197+
</listitem>
198+
</varlistentry>
199+
</variablelist>
200+
</section>
201+
<!-- }}} -->
202+
203+
<section role="changelog">
204+
&reftitle.changelog;
205+
<informaltable>
206+
<tgroup cols="2">
207+
<thead>
208+
<row>
209+
<entry>&Version;</entry>
210+
<entry>&Description;</entry>
211+
</row>
212+
</thead>
213+
<tbody>
214+
<row>
215+
<entry>PECL mongodb 2.3.0</entry>
216+
<entry>
217+
Added public <modifier>readonly</modifier> properties. The
218+
<varname>duration</varname> property replaces the
219+
<methodname>getDurationMicros</methodname> method.
220+
</entry>
221+
</row>
222+
</tbody>
223+
</tgroup>
224+
</informaltable>
225+
</section>
226+
44227
</partintro>
45228

46229
&reference.mongodb.mongodb.driver.monitoring.entities.commandfailedevent;

0 commit comments

Comments
 (0)