Debian Codegraph @

testdata/transactions/legacy/reads.json

raw symbols SCIP
1 {
2 "runOn": [
3 {
4 "minServerVersion": "4.0",
5 "topology": [
6 "replicaset"
7 ]
8 },
9 {
10 "minServerVersion": "4.1.8",
11 "topology": [
12 "sharded"
13 ]
14 }
15 ],
16 "database_name": "transaction-tests",
17 "collection_name": "test",
18 "data": [
19 {
20 "_id": 1
21 },
22 {
23 "_id": 2
24 },
25 {
26 "_id": 3
27 },
28 {
29 "_id": 4
30 }
31 ],
32 "tests": [
33 {
34 "description": "collection readConcern without transaction",
35 "operations": [
36 {
37 "name": "find",
38 "object": "collection",
39 "collectionOptions": {
40 "readConcern": {
41 "level": "majority"
42 }
43 },
44 "arguments": {
45 "session": "session0"
46 },
47 "result": [
48 {
49 "_id": 1
50 },
51 {
52 "_id": 2
53 },
54 {
55 "_id": 3
56 },
57 {
58 "_id": 4
59 }
60 ]
61 }
62 ],
63 "expectations": [
64 {
65 "command_started_event": {
66 "command": {
67 "find": "test",
68 "readConcern": {
69 "level": "majority"
70 },
71 "lsid": "session0",
72 "txnNumber": null,
73 "startTransaction": null,
74 "autocommit": null
75 },
76 "command_name": "find",
77 "database_name": "transaction-tests"
78 }
79 }
80 ],
81 "outcome": {
82 "collection": {
83 "data": [
84 {
85 "_id": 1
86 },
87 {
88 "_id": 2
89 },
90 {
91 "_id": 3
92 },
93 {
94 "_id": 4
95 }
96 ]
97 }
98 }
99 },
100 {
101 "description": "find",
102 "operations": [
103 {
104 "name": "startTransaction",
105 "object": "session0"
106 },
107 {
108 "name": "find",
109 "object": "collection",
110 "arguments": {
111 "session": "session0",
112 "batchSize": 3
113 },
114 "result": [
115 {
116 "_id": 1
117 },
118 {
119 "_id": 2
120 },
121 {
122 "_id": 3
123 },
124 {
125 "_id": 4
126 }
127 ]
128 },
129 {
130 "name": "find",
131 "object": "collection",
132 "arguments": {
133 "session": "session0",
134 "batchSize": 3
135 },
136 "result": [
137 {
138 "_id": 1
139 },
140 {
141 "_id": 2
142 },
143 {
144 "_id": 3
145 },
146 {
147 "_id": 4
148 }
149 ]
150 },
151 {
152 "name": "commitTransaction",
153 "object": "session0"
154 }
155 ],
156 "expectations": [
157 {
158 "command_started_event": {
159 "command": {
160 "find": "test",
161 "batchSize": 3,
162 "readConcern": null,
163 "lsid": "session0",
164 "txnNumber": {
165 "$numberLong": "1"
166 },
167 "startTransaction": true,
168 "autocommit": false
169 },
170 "command_name": "find",
171 "database_name": "transaction-tests"
172 }
173 },
174 {
175 "command_started_event": {
176 "command": {
177 "getMore": {
178 "$numberLong": "42"
179 },
180 "collection": "test",
181 "batchSize": 3,
182 "lsid": "session0",
183 "txnNumber": {
184 "$numberLong": "1"
185 },
186 "startTransaction": null,
187 "autocommit": false
188 },
189 "command_name": "getMore",
190 "database_name": "transaction-tests"
191 }
192 },
193 {
194 "command_started_event": {
195 "command": {
196 "find": "test",
197 "batchSize": 3,
198 "lsid": "session0",
199 "txnNumber": {
200 "$numberLong": "1"
201 },
202 "startTransaction": null,
203 "autocommit": false
204 },
205 "command_name": "find",
206 "database_name": "transaction-tests"
207 }
208 },
209 {
210 "command_started_event": {
211 "command": {
212 "getMore": {
213 "$numberLong": "42"
214 },
215 "collection": "test",
216 "batchSize": 3,
217 "lsid": "session0",
218 "txnNumber": {
219 "$numberLong": "1"
220 },
221 "startTransaction": null,
222 "autocommit": false
223 },
224 "command_name": "getMore",
225 "database_name": "transaction-tests"
226 }
227 },
228 {
229 "command_started_event": {
230 "command": {
231 "commitTransaction": 1,
232 "lsid": "session0",
233 "txnNumber": {
234 "$numberLong": "1"
235 },
236 "startTransaction": null,
237 "autocommit": false,
238 "writeConcern": null
239 },
240 "command_name": "commitTransaction",
241 "database_name": "admin"
242 }
243 }
244 ],
245 "outcome": {
246 "collection": {
247 "data": [
248 {
249 "_id": 1
250 },
251 {
252 "_id": 2
253 },
254 {
255 "_id": 3
256 },
257 {
258 "_id": 4
259 }
260 ]
261 }
262 }
263 },
264 {
265 "description": "aggregate",
266 "operations": [
267 {
268 "name": "startTransaction",
269 "object": "session0"
270 },
271 {
272 "name": "aggregate",
273 "object": "collection",
274 "arguments": {
275 "pipeline": [
276 {
277 "$project": {
278 "_id": 1
279 }
280 }
281 ],
282 "batchSize": 3,
283 "session": "session0"
284 },
285 "result": [
286 {
287 "_id": 1
288 },
289 {
290 "_id": 2
291 },
292 {
293 "_id": 3
294 },
295 {
296 "_id": 4
297 }
298 ]
299 },
300 {
301 "name": "aggregate",
302 "object": "collection",
303 "arguments": {
304 "pipeline": [
305 {
306 "$project": {
307 "_id": 1
308 }
309 }
310 ],
311 "batchSize": 3,
312 "session": "session0"
313 },
314 "result": [
315 {
316 "_id": 1
317 },
318 {
319 "_id": 2
320 },
321 {
322 "_id": 3
323 },
324 {
325 "_id": 4
326 }
327 ]
328 },
329 {
330 "name": "commitTransaction",
331 "object": "session0"
332 }
333 ],
334 "expectations": [
335 {
336 "command_started_event": {
337 "command": {
338 "aggregate": "test",
339 "pipeline": [
340 {
341 "$project": {
342 "_id": 1
343 }
344 }
345 ],
346 "cursor": {
347 "batchSize": 3
348 },
349 "readConcern": null,
350 "lsid": "session0",
351 "txnNumber": {
352 "$numberLong": "1"
353 },
354 "startTransaction": true,
355 "autocommit": false
356 },
357 "command_name": "aggregate",
358 "database_name": "transaction-tests"
359 }
360 },
361 {
362 "command_started_event": {
363 "command": {
364 "getMore": {
365 "$numberLong": "42"
366 },
367 "collection": "test",
368 "batchSize": 3,
369 "lsid": "session0",
370 "txnNumber": {
371 "$numberLong": "1"
372 },
373 "startTransaction": null,
374 "autocommit": false
375 },
376 "command_name": "getMore",
377 "database_name": "transaction-tests"
378 }
379 },
380 {
381 "command_started_event": {
382 "command": {
383 "aggregate": "test",
384 "pipeline": [
385 {
386 "$project": {
387 "_id": 1
388 }
389 }
390 ],
391 "cursor": {
392 "batchSize": 3
393 },
394 "lsid": "session0",
395 "txnNumber": {
396 "$numberLong": "1"
397 },
398 "startTransaction": null,
399 "autocommit": false
400 },
401 "command_name": "aggregate",
402 "database_name": "transaction-tests"
403 }
404 },
405 {
406 "command_started_event": {
407 "command": {
408 "getMore": {
409 "$numberLong": "42"
410 },
411 "collection": "test",
412 "batchSize": 3,
413 "lsid": "session0",
414 "txnNumber": {
415 "$numberLong": "1"
416 },
417 "startTransaction": null,
418 "autocommit": false
419 },
420 "command_name": "getMore",
421 "database_name": "transaction-tests"
422 }
423 },
424 {
425 "command_started_event": {
426 "command": {
427 "commitTransaction": 1,
428 "lsid": "session0",
429 "txnNumber": {
430 "$numberLong": "1"
431 },
432 "startTransaction": null,
433 "autocommit": false,
434 "writeConcern": null
435 },
436 "command_name": "commitTransaction",
437 "database_name": "admin"
438 }
439 }
440 ],
441 "outcome": {
442 "collection": {
443 "data": [
444 {
445 "_id": 1
446 },
447 {
448 "_id": 2
449 },
450 {
451 "_id": 3
452 },
453 {
454 "_id": 4
455 }
456 ]
457 }
458 }
459 },
460 {
461 "description": "distinct",
462 "operations": [
463 {
464 "name": "startTransaction",
465 "object": "session0"
466 },
467 {
468 "name": "distinct",
469 "object": "collection",
470 "arguments": {
471 "session": "session0",
472 "fieldName": "_id"
473 },
474 "result": [
475 1,
476 2,
477 3,
478 4
479 ]
480 },
481 {
482 "name": "commitTransaction",
483 "object": "session0"
484 }
485 ],
486 "expectations": [
487 {
488 "command_started_event": {
489 "command": {
490 "distinct": "test",
491 "key": "_id",
492 "lsid": "session0",
493 "readConcern": null,
494 "txnNumber": {
495 "$numberLong": "1"
496 },
497 "startTransaction": true,
498 "autocommit": false,
499 "writeConcern": null
500 },
501 "command_name": "distinct",
502 "database_name": "transaction-tests"
503 }
504 },
505 {
506 "command_started_event": {
507 "command": {
508 "commitTransaction": 1,
509 "lsid": "session0",
510 "readConcern": null,
511 "txnNumber": {
512 "$numberLong": "1"
513 },
514 "startTransaction": null,
515 "autocommit": false,
516 "writeConcern": null
517 },
518 "command_name": "commitTransaction",
519 "database_name": "admin"
520 }
521 }
522 ],
523 "outcome": {
524 "collection": {
525 "data": [
526 {
527 "_id": 1
528 },
529 {
530 "_id": 2
531 },
532 {
533 "_id": 3
534 },
535 {
536 "_id": 4
537 }
538 ]
539 }
540 }
541 }
542 ]
543 }