[MXS-4216] Allow stale cache usage in schemarouter Created: 2022-07-25 Updated: 2023-06-30 Resolved: 2023-06-28 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | schemarouter |
| Affects Version/s: | None |
| Fix Version/s: | 23.08.0 |
| Type: | New Feature | Priority: | Major |
| Reporter: | markus makela | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Sprint: | MXS-SPRINT-184, MXS-SPRINT-185 |
| Description |
|
Currently when the cache entry for a user expires and multiple clients try to update the expired entry, only one client ends up doing the update and the rest wait for it to complete. This was done to reduce the amount of work the database has to do. This behavior could be changed slightly so that the clients who are waiting for the information to be updated would instead proceed to use the stale entry instead. This would result in a smaller impact and it would act more as a soft TTL value instead of a hard one like it is now. |
| Comments |
| Comment by Johan Wikman [ 2022-08-02 ] |
|
"This would result in a smaller impact and it would act more as a soft TTL value instead of a hard one like it is now." That's roughly how the MaxScale cache works. If the soft TTL has been reached, then one client will be used for refreshing the client; all others continue to use the existing cached value. |