This repository was archived by the owner on May 3, 2024. It is now read-only.
Commit c3b78e4
Tim Shaffer
CORTX-33652: Add min_success parameter for index operations (#1991)
Problem:
This PR adds a per-operation setting for the minimum number of successful CAS operations for distributed
index operations. Initially, all CAS operations were required to succeed for the operation as a whole to
succeed. A previous commit (f2ba0d1) changed the behavior to reduce IO errors during degraded mode.
Currently, a single successful operation is sufficient to consider the parent operation successful. This can
lead to consistency issues, however. In the read-after-write case, stale data may be returned from successful
index operations if the child operations succeed on disjoint sets of CAS services.
Solution:
This PR changes adds a set sockopt-like function (m0_idx_op_setoption) for tuning parameters of index
operations. The only option initially available is M0_DIX_MIN_REPLICA_QUORUM. This defaults to (N+K)/2 + 1
to prevent the situation above (disjoint sets of CAS services). Clients may choose a more lax requirement if they
care more about availability than consistency. Clients (RGW) may want to add configuration options for controlling
this quorum requirement, or could use this functionality as part of S3 storage tiers, e.g. setting a bucket to use
reduced consistency operations. Note that ensuring correctness will also require a mechanism to compare versions
of replies from CAS services, which is not in the scope of this PR.
Follows is taken care of:
* Fail dix operations that don't meet the specified min_success
* Update unit test to check dix min_success
* Add m0_idx_op_setoption with M0_OIO_MIN_SUCCESS
* More detailed comment on min_success handling
* Use M0_DIX_MIN_REPLICA_QUORUM by default for dix operations
* Fix variable alignment
* Make dix_item_version_cmp consistent with rest of codebase
* Only send a single CAS GET for meta requests
* Handle M0_DIX_MIN_REPLICA_QUORUM in dix_rop_ctx_init
Signed-off-by: Tim Shaffer <[email protected]>1 parent 5e90b7b commit c3b78e4
File tree
10 files changed
+209
-38
lines changed- dix
- ut
- motr
- st
10 files changed
+209
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
| 213 | + | |
212 | 214 | | |
213 | 215 | | |
| 216 | + | |
| 217 | + | |
214 | 218 | | |
215 | 219 | | |
216 | 220 | | |
| 221 | + | |
217 | 222 | | |
218 | 223 | | |
219 | 224 | | |
| |||
222 | 227 | | |
223 | 228 | | |
224 | 229 | | |
225 | | - | |
| 230 | + | |
226 | 231 | | |
227 | 232 | | |
228 | 233 | | |
229 | 234 | | |
230 | | - | |
| 235 | + | |
| 236 | + | |
231 | 237 | | |
232 | | - | |
| 238 | + | |
233 | 239 | | |
234 | 240 | | |
235 | 241 | | |
| |||
1304 | 1310 | | |
1305 | 1311 | | |
1306 | 1312 | | |
1307 | | - | |
1308 | | - | |
1309 | | - | |
1310 | | - | |
1311 | | - | |
1312 | | - | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
1313 | 1320 | | |
1314 | 1321 | | |
1315 | 1322 | | |
| |||
1320 | 1327 | | |
1321 | 1328 | | |
1322 | 1329 | | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
1323 | 1337 | | |
1324 | 1338 | | |
1325 | 1339 | | |
| |||
1402 | 1416 | | |
1403 | 1417 | | |
1404 | 1418 | | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
1405 | 1433 | | |
1406 | 1434 | | |
1407 | 1435 | | |
| |||
1418 | 1446 | | |
1419 | 1447 | | |
1420 | 1448 | | |
1421 | | - | |
| 1449 | + | |
| 1450 | + | |
1422 | 1451 | | |
1423 | 1452 | | |
1424 | 1453 | | |
| |||
1620 | 1649 | | |
1621 | 1650 | | |
1622 | 1651 | | |
1623 | | - | |
1624 | | - | |
1625 | | - | |
1626 | | - | |
1627 | | - | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
1628 | 1659 | | |
1629 | 1660 | | |
1630 | 1661 | | |
1631 | 1662 | | |
1632 | 1663 | | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
1633 | 1670 | | |
1634 | | - | |
1635 | | - | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
1636 | 1701 | | |
1637 | | - | |
1638 | | - | |
1639 | | - | |
1640 | | - | |
1641 | | - | |
1642 | | - | |
1643 | 1702 | | |
1644 | | - | |
| 1703 | + | |
| 1704 | + | |
1645 | 1705 | | |
| 1706 | + | |
1646 | 1707 | | |
1647 | 1708 | | |
1648 | 1709 | | |
| |||
2137 | 2198 | | |
2138 | 2199 | | |
2139 | 2200 | | |
2140 | | - | |
| 2201 | + | |
| 2202 | + | |
2141 | 2203 | | |
2142 | 2204 | | |
2143 | | - | |
| 2205 | + | |
2144 | 2206 | | |
2145 | 2207 | | |
2146 | 2208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
256 | 261 | | |
257 | 262 | | |
258 | 263 | | |
| |||
283 | 288 | | |
284 | 289 | | |
285 | 290 | | |
286 | | - | |
| 291 | + | |
| 292 | + | |
287 | 293 | | |
288 | 294 | | |
289 | 295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1244 | 1244 | | |
1245 | 1245 | | |
1246 | 1246 | | |
1247 | | - | |
| 1247 | + | |
1248 | 1248 | | |
1249 | 1249 | | |
1250 | 1250 | | |
| |||
1285 | 1285 | | |
1286 | 1286 | | |
1287 | 1287 | | |
| 1288 | + | |
1288 | 1289 | | |
1289 | 1290 | | |
1290 | 1291 | | |
| |||
1294 | 1295 | | |
1295 | 1296 | | |
1296 | 1297 | | |
1297 | | - | |
| 1298 | + | |
1298 | 1299 | | |
1299 | 1300 | | |
1300 | 1301 | | |
| |||
1397 | 1398 | | |
1398 | 1399 | | |
1399 | 1400 | | |
1400 | | - | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
1401 | 1412 | | |
1402 | 1413 | | |
1403 | 1414 | | |
1404 | 1415 | | |
1405 | 1416 | | |
1406 | 1417 | | |
1407 | | - | |
| 1418 | + | |
1408 | 1419 | | |
1409 | 1420 | | |
1410 | 1421 | | |
1411 | 1422 | | |
1412 | 1423 | | |
1413 | 1424 | | |
1414 | | - | |
| 1425 | + | |
1415 | 1426 | | |
1416 | 1427 | | |
1417 | 1428 | | |
| |||
1420 | 1431 | | |
1421 | 1432 | | |
1422 | 1433 | | |
1423 | | - | |
| 1434 | + | |
1424 | 1435 | | |
1425 | 1436 | | |
1426 | 1437 | | |
| |||
2655 | 2666 | | |
2656 | 2667 | | |
2657 | 2668 | | |
| 2669 | + | |
2658 | 2670 | | |
2659 | | - | |
2660 | | - | |
2661 | | - | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
2662 | 2675 | | |
2663 | 2676 | | |
2664 | | - | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
2665 | 2693 | | |
2666 | 2694 | | |
2667 | 2695 | | |
2668 | 2696 | | |
| 2697 | + | |
2669 | 2698 | | |
2670 | 2699 | | |
2671 | 2700 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
571 | 589 | | |
572 | 590 | | |
573 | 591 | | |
| |||
1628 | 1646 | | |
1629 | 1647 | | |
1630 | 1648 | | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
1631 | 1661 | | |
1632 | 1662 | | |
1633 | 1663 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
233 | 239 | | |
234 | 240 | | |
235 | 241 | | |
| |||
0 commit comments