Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-1719

masking filter with readwritesplit router problems

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • 2.2.2
    • N/A
    • masking, readwritesplit
    • None
    • 1 maxscale, 1 master & 1 slave
    • 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:

      2018-03-15 14:08:27   info   : (64) [readwritesplit] Route query to master      [db01]:3306 <
      2018-03-15 14:08:27   warning: (64) [masking] Received data, although expected nothing.
      2018-03-15 14:08:27   warning: (64) [masking] Received data, although expected nothing.
      2018-03-15 14:08:27   warning: (64) [masking] Received data, although expected nothing.
      2018-03-15 14:08:27   warning: (64) [masking] Received data, although expected nothing.
      2018-03-15 14:08:27   warning: (64) [masking] Received data, although expected nothing.
      

      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:

      [Mask-Users]
      type=filter
      module=masking
      warn_type_mismatch=always
      rules=/etc/maxscale.modules.d/mask-users.json
       
      [R/W-Service]
      type=service
      router=readwritesplit
      servers=db01,db02
      user=maxscale
      passwd=XXXXXXX
      max_slave_connections=100%
      filters=Mask-Users
      

      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:

      {
          "rules": [
              {
                  "replace": {
                      "database": "documentsdev",
                      "column": "aa_label"
                  },
                  "with": {
                      "fill": "*"
                  },
                  "applies_to": ["dev_user1", "dev_user2", "dev_user3", "dev_user4"]
              },
              {
                  "replace": {
                      "database": "documentsdev",
                      "column": "al_diff"
                  },
                  "with": {
                      "fill": "*"
                  },
                  "applies_to": ["dev_user1", "dev_user2", "dev_user3", "dev_user4"]
              },
              {
                  "replace": {
                      "database": "documentsdev",
                      "column": "al_username"
                  },
                  "with": {
                      "fill": "*"
                  },
                  "applies_to": ["dev_user1", "dev_user2", "dev_user3", "dev_user4"]
              },
              {
                  "replace": {
                      "database": "documentsdev",
                      "column": "ar_u_username"
                  },
                  "with": {
                      "fill": "*"
                  },
                  "applies_to": ["dev_user1", "dev_user2", "dev_user3", "dev_user4"]
              }
          ]
      }
      

      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.

      ___________________________
      UPDATE:
      It does the same with only 1 simple rule:

      {
          "rules": [
              {
                  "replace": {
                      "database": "documentsdev",
                      "column": "aa_label"
                  },
                  "with": {
                      "fill": "*"
                  },
                  "applies_to": ["dev_user1", "dev_user2", "dev_user3", "dev_user4"]
              }
          ]
      }
      

      And the above rule is for a different database

      Attachments

        Issue Links

          Activity

            People

              johan.wikman Johan Wikman
              zeve Zeve
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.