[MXS-1998] Shard map refresh is not logged on any level Created: 2018-08-05 Updated: 2020-09-02 Resolved: 2020-09-02 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | schemarouter |
| Affects Version/s: | 2.2.11 |
| Fix Version/s: | 2.5.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Wagner Bianchi (Inactive) | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Folks, Working with an initially simple sharding with 10 servers/backends, I got the following variables added to a basic configuration file (/etc/maxscale.cnf):
The refresh_interval configured as 5 seconds is too low for the number of database schemas which are going to be added and removed from the shardings. I'm planning to increase that value as I see lots of resources being spent by that activity. The primary goal here is that I can't see any events being added to the log, even enabling the log-priority info, I can't see any mapping refresh, any re-mapping due to a lousy database context change (when you do a bad USE <non-existing-db>. Is it possible to add that information over a notice class in the log file? |
| Comments |
| Comment by markus makela [ 2018-08-06 ] |
|
We can definitely add an info level message for it but a notice level message would be too verbose and would not really bring any relevant information for the majority of users. The biggest problem is that the way the database refreshing is implemented: When it is time to refresh the database list, all active users of that list will try to update it. This means that every query that arrives after the refresh has started will trigger a new round of database queries. This pessimistic approach would work if the rate of failure for updates would be very high. As the listing of databases is almost guaranteed to succeed, this just causes an extra overhead in updating of the lists. The correct way to do the update would be to assign it to one connection and re-assing it if it fails. |
| Comment by Wagner Bianchi (Inactive) [ 2018-08-15 ] |
|
I agree, Markus. Maybe having only one connection doing it and making it as done in case the last iteration to create refresh the mapping list returns true would be enough. The intention is to give it more verbosity when the database mapping list is updated. I understood the design limitation also. Having this information will help to detect possible connection denies, which in this scenario, can be interpreted as a connection that tries to use a non-existing database (non-existing on the mapping list, but physically created)... right? |
| Comment by markus makela [ 2020-08-31 ] |
|
We'll add an info level message so that at least some trace is left in the log when the database map is updated. |