1
+ {
2
+ "description" : " when in a transaction, search index operations ignore read and write concern" ,
3
+ "schemaVersion" : " 1.4" ,
4
+ "createEntities" : [
5
+ {
6
+ "client" : {
7
+ "id" : " client0" ,
8
+ "useMultipleMongoses" : false ,
9
+ "uriOptions" : {
10
+ "readConcernLevel" : " local" ,
11
+ "w" : 1
12
+ },
13
+ "observeEvents" : [
14
+ " commandStartedEvent"
15
+ ]
16
+ }
17
+ },
18
+ {
19
+ "session" : {
20
+ "id" : " session0" ,
21
+ "client" : " client0"
22
+ }
23
+ },
24
+ {
25
+ "database" : {
26
+ "id" : " database0" ,
27
+ "client" : " client0" ,
28
+ "databaseName" : " database0"
29
+ }
30
+ },
31
+ {
32
+ "collection" : {
33
+ "id" : " collection0" ,
34
+ "database" : " database0" ,
35
+ "collectionName" : " collection0"
36
+ }
37
+ }
38
+ ],
39
+ "runOnRequirements" : [
40
+ {
41
+ "minServerVersion" : " 7.0.0" ,
42
+ "topologies" : [
43
+ " replicaset" ,
44
+ " load-balanced" ,
45
+ " sharded"
46
+ ],
47
+ "serverless" : " forbid"
48
+ }
49
+ ],
50
+ "tests" : [
51
+ {
52
+ "description" : " when in a transaction, createSearchIndex ignores read and write concern" ,
53
+ "operations" : [
54
+ {
55
+ "name" : " createSearchIndex" ,
56
+ "object" : " collection0" ,
57
+ "arguments" : {
58
+ "session" : " session0" ,
59
+ "model" : {
60
+ "definition" : {
61
+ "mappings" : {
62
+ "dynamic" : true
63
+ }
64
+ }
65
+ }
66
+ },
67
+ "expectError" : {
68
+ "isError" : true ,
69
+ "errorContains" : " Atlas"
70
+ }
71
+ }
72
+ ],
73
+ "expectEvents" : [
74
+ {
75
+ "client" : " client0" ,
76
+ "events" : [
77
+ {
78
+ "commandStartedEvent" : {
79
+ "command" : {
80
+ "createSearchIndexes" : " collection0" ,
81
+ "indexes" : [
82
+ {
83
+ "definition" : {
84
+ "mappings" : {
85
+ "dynamic" : true
86
+ }
87
+ }
88
+ }
89
+ ],
90
+ "$db" : " database0" ,
91
+ "writeConcern" : {
92
+ "$$exists" : false
93
+ },
94
+ "readConcern" : {
95
+ "$$exists" : false
96
+ }
97
+ }
98
+ }
99
+ }
100
+ ]
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ "description" : " when in a transaction, createSearchIndexes ignores read and write concern" ,
106
+ "operations" : [
107
+ {
108
+ "name" : " createSearchIndexes" ,
109
+ "object" : " collection0" ,
110
+ "arguments" : {
111
+ "session" : " session0" ,
112
+ "models" : []
113
+ },
114
+ "expectError" : {
115
+ "isError" : true ,
116
+ "errorContains" : " Atlas"
117
+ }
118
+ }
119
+ ],
120
+ "expectEvents" : [
121
+ {
122
+ "client" : " client0" ,
123
+ "events" : [
124
+ {
125
+ "commandStartedEvent" : {
126
+ "command" : {
127
+ "createSearchIndexes" : " collection0" ,
128
+ "indexes" : [],
129
+ "$db" : " database0" ,
130
+ "writeConcern" : {
131
+ "$$exists" : false
132
+ },
133
+ "readConcern" : {
134
+ "$$exists" : false
135
+ }
136
+ }
137
+ }
138
+ }
139
+ ]
140
+ }
141
+ ]
142
+ },
143
+ {
144
+ "description" : " when in a transaction, dropSearchIndex ignores read and write concern" ,
145
+ "operations" : [
146
+ {
147
+ "name" : " dropSearchIndex" ,
148
+ "object" : " collection0" ,
149
+ "arguments" : {
150
+ "session" : " session0" ,
151
+ "name" : " test index"
152
+ },
153
+ "expectError" : {
154
+ "isError" : true ,
155
+ "errorContains" : " Atlas"
156
+ }
157
+ }
158
+ ],
159
+ "expectEvents" : [
160
+ {
161
+ "client" : " client0" ,
162
+ "events" : [
163
+ {
164
+ "commandStartedEvent" : {
165
+ "command" : {
166
+ "dropSearchIndex" : " collection0" ,
167
+ "name" : " test index" ,
168
+ "$db" : " database0" ,
169
+ "writeConcern" : {
170
+ "$$exists" : false
171
+ },
172
+ "readConcern" : {
173
+ "$$exists" : false
174
+ }
175
+ }
176
+ }
177
+ }
178
+ ]
179
+ }
180
+ ]
181
+ },
182
+ {
183
+ "description" : " when in a transaction, listSearchIndexes ignores read and write concern" ,
184
+ "operations" : [
185
+ {
186
+ "name" : " listSearchIndexes" ,
187
+ "object" : " collection0" ,
188
+ "expectError" : {
189
+ "isError" : true ,
190
+ "errorContains" : " Atlas"
191
+ }
192
+ }
193
+ ],
194
+ "expectEvents" : [
195
+ {
196
+ "client" : " client0" ,
197
+ "events" : [
198
+ {
199
+ "commandStartedEvent" : {
200
+ "command" : {
201
+ "aggregate" : " collection0" ,
202
+ "pipeline" : [
203
+ {
204
+ "$listSearchIndexes" : {}
205
+ }
206
+ ],
207
+ "writeConcern" : {
208
+ "$$exists" : false
209
+ },
210
+ "readConcern" : {
211
+ "$$exists" : false
212
+ }
213
+ }
214
+ }
215
+ }
216
+ ]
217
+ }
218
+ ]
219
+ },
220
+ {
221
+ "description" : " when in a transaction, updateSearchIndex ignores the read and write concern" ,
222
+ "operations" : [
223
+ {
224
+ "name" : " updateSearchIndex" ,
225
+ "object" : " collection0" ,
226
+ "arguments" : {
227
+ "session" : " session0" ,
228
+ "name" : " test index" ,
229
+ "definition" : {}
230
+ },
231
+ "expectError" : {
232
+ "isError" : true ,
233
+ "errorContains" : " Atlas"
234
+ }
235
+ }
236
+ ],
237
+ "expectEvents" : [
238
+ {
239
+ "client" : " client0" ,
240
+ "events" : [
241
+ {
242
+ "commandStartedEvent" : {
243
+ "command" : {
244
+ "updateSearchIndex" : " collection0" ,
245
+ "name" : " test index" ,
246
+ "definition" : {},
247
+ "$db" : " database0" ,
248
+ "writeConcern" : {
249
+ "$$exists" : false
250
+ },
251
+ "readConcern" : {
252
+ "$$exists" : false
253
+ }
254
+ }
255
+ }
256
+ }
257
+ ]
258
+ }
259
+ ]
260
+ }
261
+ ]
262
+ }
263
+
0 commit comments