[MXS-1719] masking filter with readwritesplit router problems Created: 2018-03-15 Updated: 2020-08-27 Resolved: 2020-08-27 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | masking, readwritesplit |
| Affects Version/s: | 2.2.2 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Zeve | Assignee: | Johan Wikman |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Environment: |
1 maxscale, 1 master & 1 slave |
||
| Issue Links: |
|
||||||||||||
| Sprint: | MXS-SPRINT-54, MXS-SPRINT-58, MXS-SPRINT-59, MXS-SPRINT-60, MXS-SPRINT-61, MXS-SPRINT-62, MXS-SPRINT-63 | ||||||||||||
| Description |
|
When using the masking filter together with a *readwritesplit * router for basic queries/inserts it works; the same goes when doing normal inserts from CLI or phpmyadmin. However, when using the application and doing complex inserts, i get the following message:
and the application hangs, no other error messages (log-info is enabled). I cannot find anything related to this message. Is there any limitation when combining readwritesplit router and the masking filter? It manifests the same behavior even with only one server (when the slave is down). Here are the masking and service configurations:
Here are a part of the masking rules, they just repeat for different databases and more columns...I masked some db_names/user due to my company privacy issues:
The masking filter applies to a small list of users, which are different than the users under which the application runs. However when using the masking filter with the *readconnroute * router, everything works fine. ___________________________
And the above rule is for a different database |
| Comments |
| Comment by Johan Wikman [ 2018-03-15 ] | ||
|
Could you provide your masking rules and an example of a problematic complex insert? | ||
| Comment by Zeve [ 2018-03-15 ] | ||
|
@Johan.wikman I updated the rules info, however I cannot post the whole query as it contains company sensitive data. (I have the full info logs from maxscale; is there a way to send them secure?) | ||
| Comment by Johan Wikman [ 2018-03-16 ] | ||
|
zeve You can upload stuff to ftp://ftp.mariadb.com/uploads Then please notify me at johan.wikman@mariadb.com when you have uploaded the log and what the filename is. | ||
| Comment by Zeve [ 2018-03-16 ] | ||
|
@Johan Wikman , I uploaded the files and sent you an email. | ||
| Comment by Johan Wikman [ 2018-03-16 ] | ||
|
zeveThank you, I have the zip-file now and will start investigating. | ||
| Comment by Johan Wikman [ 2018-03-16 ] | ||
|
zeve I managed to reproduce the problem. It's related to multi-statements. If you can somehow prevent the client from using multi-statements then it probably would work. We'll fix it properly but cannot yet say when the fix will be available. | ||
| Comment by Zeve [ 2018-03-19 ] | ||
|
Hi Johan, Thank you for the investigation! As our application is a bit complex, we cannot use simple-statements, so we will have to use a write-only service only for the master server. | ||
| Comment by Johan Wikman [ 2018-03-19 ] | ||
|
Hi, | ||
| Comment by Johan Wikman [ 2018-03-21 ] | ||
|
There was a problem in the handling of multi-statements in readwritesplit. | ||
| Comment by Zeve [ 2018-04-20 ] | ||
|
Hi Johan, That specific problem might have been fixed, but I still got the same warning message: "warning: (64) [masking] Received data, although expected nothing." and the application is not working properly. I already uploaded a new zip to mariadb's FTP, please let me know if I should open a different issue. Zeve. | ||
| Comment by Johan Wikman [ 2018-05-03 ] | ||
|
Hi zeve Could you send me a mail with the name of the file that you uploaded. Thanks, Johan | ||
| Comment by Johan Wikman [ 2018-05-03 ] | ||
|
Thanks for the mail. And just to be certain, could you confirm that it is with MaxScale 2.2.4 that you get these warning messages. | ||
| Comment by Zeve [ 2018-05-03 ] | ||
|
Hi Johan, Yes, I am using Maxscale 2.2.4 now. I restarted/checked the version and retested now, just to be sure. | ||
| Comment by Johan Wikman [ 2018-05-03 ] | ||
|
Ok thanks, I'll investigate. | ||
| Comment by Johan Wikman [ 2018-05-08 ] | ||
|
Hi zeve Does the system work? That is, is it "only" the case that you see a warning message you do not expect to see? Johan | ||
| Comment by Zeve [ 2018-05-08 ] | ||
|
Hi Johan, The web-app works partially, it throws an error when creating a user (which has correspondence in these 'warning' messages) - though somehow the user is created - but I haven't tested it filling all the optional fields from the app when creating a user. Some other modules of the web-app work. Zeve | ||
| Comment by Johan Wikman [ 2018-05-08 ] | ||
|
After investigation, I'm quite certain it is only the logging that is wrong. That is, multi-statements are handled correctly and the warning is logged erroneously. So, I will again close this, but have created | ||
| Comment by Zeve [ 2018-05-08 ] | ||
|
Hi Johan, If only the logging is the problem, then our app should work without errors, but it throws errors when using 'R/W split' compared to 'Write-Only' service. If you need, I can provide again two sets of logs: one from a successful operation (when going though the 'Read-Only' Service) and the other one where the apps gives the error - and also the 'warning' message appears in the logs - (when going through the 'R/W split' service). Zeve | ||
| Comment by Johan Wikman [ 2018-05-08 ] | ||
|
That would be very kind of you. And, could you please try without the masking filter, so that we would find out whether the masking filter actually plays a role here. Johan | ||
| Comment by Zeve [ 2018-05-09 ] | ||
|
Hi Johan, I uploaded the logs and maxscale.cnf to the FTP server. The archive is called: Zeve - maxscale logs - 5.09.2018.zip . Zeve UPDATE: I was using maxscale 2.2.5 | ||
| Comment by Johan Wikman [ 2018-05-15 ] | ||
|
Hi zeve Thanks for the upload. Unfortunately, I only now have been able to start working on this. Could you still try with R/W-Service but with the the masking filter excluded. If that does not work properly, then it's likely to be an ReadWriteSplit problem but if it does, then the culprit is the masking filter or the combination of ReadWriteSplit and the masking filter. | ||
| Comment by Zeve [ 2018-05-15 ] | ||
|
Hi Johan, R/W split without the masking _ filter works fine. _Read-Only with masking works fine. Only the combination of R/W split and masking is troublesome. Zeve. | ||
| Comment by Johan Wikman [ 2018-05-15 ] | ||
|
Ok, thanks! | ||
| Comment by Johan Wikman [ 2018-05-31 ] | ||
|
Hi zeve Unfortunately I have been occupied by other issues, so I have not been able to investigate this. It would be helpful if you could check whether 2.2.6 exposes the same faulty behaviour as 2.2.4. Johan | ||
| Comment by Zeve [ 2018-06-05 ] | ||
|
Hi Johan, I will test it again with maxscale 2.2.8, (as it is the latest version) and let you know. Zeve | ||
| Comment by Zeve [ 2018-06-05 ] | ||
|
Hi Johan, I re-did the test and the result is the same. I uploaded the "Zeve - maxscale-2.2.8.log" file with logs on the FTP. Zeve | ||
| Comment by Johan Wikman [ 2018-06-05 ] | ||
|
Thanks! | ||
| Comment by Johan Wikman [ 2018-06-11 ] | ||
|
The only thing fishy in that log are the
lines, but as that's just a comment it should not have any impact on anything. The sqlite based parser we used simply did not recognize # as the beginning of an end-of-line comment. If you can prevent that comment from being inserted, it would help us rule things out. | ||
| Comment by Zeve [ 2018-06-11 ] | ||
|
Hi, I'll talk to the dev guys and see if they can do something about it and let you know. PS: it would still be a good idea to make qc_sqlite aware of these comments if possible. | ||
| Comment by Johan Wikman [ 2018-06-11 ] | ||
|
Of course I'll make qc_sqlite aware of such comments; in fact that has been fixed already Could you also ask the dev guys whether they in any situation after having sent a request, issue another one, before the response to the first one has been received? Johan | ||
| Comment by Johan Wikman [ 2018-06-11 ] | ||
|
zeve You web-app, what language is it written in and what client library do you use? Johan | ||
| Comment by Zeve [ 2018-06-14 ] | ||
|
Hi Johan, To answer your questions: "Your web-app, what language is it written in and what client library do you use?"
"Could you also ask the dev guys whether they in any situation after having sent a request, issue another one, before the response to the first one has been received?"
This is what our dev guys told me. Zeve. | ||
| Comment by Johan Wikman [ 2018-06-29 ] | ||
|
Hi zeve, if you did not notice we just released 2.2.10 that correctly handles #-comments. Not that I can see how that could have any impact on the problems that you face. | ||
| Comment by markus makela [ 2020-08-27 ] | ||
|
Closing as Cannot Reproduce. If this still happens with the latest releases, please let us know and we'll reopen the issue. |