Commit f99e867
committed
assume arg to Account.invalidate_cache is relative to current shard
instead of assuming it's relative to the birth shard
Note: this means that the call to invalidate the cache before an account
is saved should start working, which may increase the number of cache
invalidations on this key.
fixes CNVS-25290
test plan:
- in a rails console, activate a shard that is not the birth shard
- Call `Account.find_cached(<local_id>)`, notice the db query
- Call `Account.invalidate_cache(<local_id>)`, should return true or
1 indicating that it successfully deleted something from the cache
Change-Id: I1da7a6ab4eb457d9bc4287f2294aebcb2f9c825e
Reviewed-on: https://gerrit.instructure.com/67732
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>1 parent 2123950 commit f99e867
2 files changed
Lines changed: 29 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
| 528 | + | |
| 529 | + | |
528 | 530 | | |
529 | | - | |
| 531 | + | |
530 | 532 | | |
531 | 533 | | |
532 | 534 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 23 | | |
35 | 24 | | |
36 | 25 | | |
| |||
1407 | 1396 | | |
1408 | 1397 | | |
1409 | 1398 | | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
1410 | 1425 | | |
0 commit comments