Debian Codegraph @

testdata/transactions/legacy/findOneAndDelete.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 "tests": [
30 {
31 "description": "findOneAndDelete",
32 "operations": [
33 {
34 "name": "startTransaction",
35 "object": "session0"
36 },
37 {
38 "name": "findOneAndDelete",
39 "object": "collection",
40 "arguments": {
41 "session": "session0",
42 "filter": {
43 "_id": 3
44 }
45 },
46 "result": {
47 "_id": 3
48 }
49 },
50 {
51 "name": "findOneAndDelete",
52 "object": "collection",
53 "arguments": {
54 "session": "session0",
55 "filter": {
56 "_id": 4
57 }
58 },
59 "result": null
60 },
61 {
62 "name": "commitTransaction",
63 "object": "session0"
64 }
65 ],
66 "expectations": [
67 {
68 "command_started_event": {
69 "command": {
70 "findAndModify": "test",
71 "query": {
72 "_id": 3
73 },
74 "remove": true,
75 "lsid": "session0",
76 "txnNumber": {
77 "$numberLong": "1"
78 },
79 "startTransaction": true,
80 "autocommit": false,
81 "readConcern": null,
82 "writeConcern": null
83 },
84 "command_name": "findAndModify",
85 "database_name": "transaction-tests"
86 }
87 },
88 {
89 "command_started_event": {
90 "command": {
91 "findAndModify": "test",
92 "query": {
93 "_id": 4
94 },
95 "remove": true,
96 "lsid": "session0",
97 "txnNumber": {
98 "$numberLong": "1"
99 },
100 "startTransaction": null,
101 "autocommit": false,
102 "readConcern": null,
103 "writeConcern": null
104 },
105 "command_name": "findAndModify",
106 "database_name": "transaction-tests"
107 }
108 },
109 {
110 "command_started_event": {
111 "command": {
112 "commitTransaction": 1,
113 "lsid": "session0",
114 "txnNumber": {
115 "$numberLong": "1"
116 },
117 "startTransaction": null,
118 "autocommit": false,
119 "readConcern": null,
120 "writeConcern": null
121 },
122 "command_name": "commitTransaction",
123 "database_name": "admin"
124 }
125 }
126 ],
127 "outcome": {
128 "collection": {
129 "data": [
130 {
131 "_id": 1
132 },
133 {
134 "_id": 2
135 }
136 ]
137 }
138 }
139 },
140 {
141 "description": "collection writeConcern ignored for findOneAndDelete",
142 "operations": [
143 {
144 "name": "startTransaction",
145 "object": "session0",
146 "arguments": {
147 "options": {
148 "writeConcern": {
149 "w": "majority"
150 }
151 }
152 }
153 },
154 {
155 "name": "findOneAndDelete",
156 "object": "collection",
157 "collectionOptions": {
158 "writeConcern": {
159 "w": "majority"
160 }
161 },
162 "arguments": {
163 "session": "session0",
164 "filter": {
165 "_id": 3
166 }
167 },
168 "result": {
169 "_id": 3
170 }
171 },
172 {
173 "name": "commitTransaction",
174 "object": "session0"
175 }
176 ],
177 "expectations": [
178 {
179 "command_started_event": {
180 "command": {
181 "findAndModify": "test",
182 "query": {
183 "_id": 3
184 },
185 "remove": true,
186 "lsid": "session0",
187 "txnNumber": {
188 "$numberLong": "1"
189 },
190 "startTransaction": true,
191 "autocommit": false,
192 "readConcern": null,
193 "writeConcern": null
194 },
195 "command_name": "findAndModify",
196 "database_name": "transaction-tests"
197 }
198 },
199 {
200 "command_started_event": {
201 "command": {
202 "commitTransaction": 1,
203 "lsid": "session0",
204 "txnNumber": {
205 "$numberLong": "1"
206 },
207 "startTransaction": null,
208 "autocommit": false,
209 "readConcern": null,
210 "writeConcern": {
211 "w": "majority"
212 }
213 },
214 "command_name": "commitTransaction",
215 "database_name": "admin"
216 }
217 }
218 ]
219 }
220 ]
221 }