1{
2 "runOn": [
3 {
4 "minServerVersion": "4.0",
5 "topology": [
6 "replicaset"
7 ]
8 },
9 {
10 "minServerVersion": "4.1.7",
11 "topology": [
12 "sharded",
13 "load-balanced"
14 ]
15 }
16 ],
17 "data": [
18 {
19 "_id": 1,
20 "x": 11
21 },
22 {
23 "_id": 2,
24 "x": 22
25 }
26 ],
27 "tests": [
28 {
29 "description": "FindOneAndDelete succeeds after PrimarySteppedDown",
30 "failPoint": {
31 "configureFailPoint": "failCommand",
32 "mode": {
33 "times": 1
34 },
35 "data": {
36 "failCommands": [
37 "findAndModify"
38 ],
39 "errorCode": 189,
40 "errorLabels": [
41 "RetryableWriteError"
42 ]
43 }
44 },
45 "operation": {
46 "name": "findOneAndDelete",
47 "arguments": {
48 "filter": {
49 "x": {
50 "$gte": 11
51 }
52 },
53 "sort": {
54 "x": 1
55 }
56 }
57 },
58 "outcome": {
59 "result": {
60 "_id": 1,
61 "x": 11
62 },
63 "collection": {
64 "data": [
65 {
66 "_id": 2,
67 "x": 22
68 }
69 ]
70 }
71 }
72 },
73 {
74 "description": "FindOneAndDelete succeeds after WriteConcernError ShutdownInProgress",
75 "failPoint": {
76 "configureFailPoint": "failCommand",
77 "mode": {
78 "times": 1
79 },
80 "data": {
81 "failCommands": [
82 "findAndModify"
83 ],
84 "writeConcernError": {
85 "code": 91,
86 "errmsg": "Replication is being shut down",
87 "errorLabels": [
88 "RetryableWriteError"
89 ]
90 }
91 }
92 },
93 "operation": {
94 "name": "findOneAndDelete",
95 "arguments": {
96 "filter": {
97 "x": {
98 "$gte": 11
99 }
100 },
101 "sort": {
102 "x": 1
103 }
104 }
105 },
106 "outcome": {
107 "result": {
108 "_id": 1,
109 "x": 11
110 },
111 "collection": {
112 "data": [
113 {
114 "_id": 2,
115 "x": 22
116 }
117 ]
118 }
119 }
120 },
121 {
122 "description": "FindOneAndDelete fails with a RetryableWriteError label after two connection failures",
123 "failPoint": {
124 "configureFailPoint": "failCommand",
125 "mode": {
126 "times": 2
127 },
128 "data": {
129 "failCommands": [
130 "findAndModify"
131 ],
132 "closeConnection": true
133 }
134 },
135 "operation": {
136 "name": "findOneAndDelete",
137 "arguments": {
138 "filter": {
139 "x": {
140 "$gte": 11
141 }
142 },
143 "sort": {
144 "x": 1
145 }
146 }
147 },
148 "outcome": {
149 "error": true,
150 "result": {
151 "errorLabelsContain": [
152 "RetryableWriteError"
153 ]
154 },
155 "collection": {
156 "data": [
157 {
158 "_id": 1,
159 "x": 11
160 },
161 {
162 "_id": 2,
163 "x": 22
164 }
165 ]
166 }
167 }
168 }
169 ]
170}
View as plain text