Commit 6f5a603
committed
errors: introduce SchemaAgreementError
Few things happen here.
1. Introducing new error type SchemaAgreementTimeout
This is rather a rename of `SchemaVersionFetch` error type. We extend the type
by additional variants.
2. Removing ProtocolError::SchemaVersionFetch variant
3. Narrowing the error type of schema agreement methods
Thanks to that, public API methods (e.g. Session::await_schema_agreement)
can return a self-contained error type providing more context than previously
returned ExecutionError.
4. Replacing ExecutionError::SchemaAgreementTimeout with SchemaAgreementError variant
SchemaAgreementError dependency is still needed, because of auto await schema agreement
configuration. By default, the driver awaits schema agreement on schema altering
queries.
5. Adjusting the example
Previously, the example would (unjustifiably) match against ExecutionError::RequestTimeout
error. Even before this PR, it should match against ExecutionError::SchemaAgreementTimeout.
Thanks to this commit, we were able to spot and fix this issue.1 parent ba2d164 commit 6f5a603
File tree
4 files changed
+36
-28
lines changed- examples
- scylla/src
- client
- network
4 files changed
+36
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
1938 | 1938 | | |
1939 | 1939 | | |
1940 | 1940 | | |
1941 | | - | |
| 1941 | + | |
1942 | 1942 | | |
1943 | 1943 | | |
1944 | 1944 | | |
| |||
1947 | 1947 | | |
1948 | 1948 | | |
1949 | 1949 | | |
1950 | | - | |
| 1950 | + | |
1951 | 1951 | | |
1952 | 1952 | | |
1953 | 1953 | | |
1954 | 1954 | | |
1955 | 1955 | | |
1956 | | - | |
| 1956 | + | |
1957 | 1957 | | |
1958 | 1958 | | |
1959 | 1959 | | |
1960 | 1960 | | |
1961 | | - | |
| 1961 | + | |
1962 | 1962 | | |
1963 | 1963 | | |
1964 | 1964 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 83 | | |
88 | 84 | | |
89 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | 165 | | |
170 | 166 | | |
171 | 167 | | |
| |||
198 | 194 | | |
199 | 195 | | |
200 | 196 | | |
201 | | - | |
| 197 | + | |
202 | 198 | | |
203 | 199 | | |
204 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
205 | 213 | | |
206 | 214 | | |
207 | 215 | | |
208 | 216 | | |
209 | 217 | | |
210 | 218 | | |
211 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
212 | 224 | | |
213 | 225 | | |
214 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
1261 | 1261 | | |
1262 | 1262 | | |
1263 | 1263 | | |
1264 | | - | |
| 1264 | + | |
1265 | 1265 | | |
1266 | 1266 | | |
1267 | 1267 | | |
1268 | 1268 | | |
1269 | | - | |
1270 | | - | |
1271 | | - | |
1272 | | - | |
1273 | | - | |
| 1269 | + | |
1274 | 1270 | | |
1275 | | - | |
1276 | | - | |
1277 | | - | |
| 1271 | + | |
1278 | 1272 | | |
1279 | 1273 | | |
1280 | 1274 | | |
| |||
0 commit comments