Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-36154

Replication of CREATE VIEW crashes replication target

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Not a Bug
    • 10.6.14
    • N/A
    • Galera, Replication
    • None

    Description

      We have seen the following error couple of times on our mariadb galeracluster replications on the replication target host:

      Slave SQL: Error 'Warning: Can't copy ownership for file './data/viewname.frm-' (Errcode: 1 "Operation not permitted")' on query. Default database: 'data'. Query: 'CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=`username`@`%` SQL SECURITY INVOKER VIEW `viewname` AS SELECT someFields...

      Everything else works fine, but sporadically we see these errors, and then replication stops and needs to be started from scratch.

      The pod is running as non-root user 1001.

      As a workaround I am thinking about simply not replicating any view specific modifications. But preferably, of course, the bug would be fixed in mariadb.

      We are doing the same tasks on more than 30 different galeraclusters. We have seen this problem on only 3 of these. On these three databases the concerned table, for which the view should be update, is particularly large, it has more than a milion rows there.

      (we have not tested it on more recent mariadb versions yet, but will do)

      Attachments

        Activity

          sorry, I think I just found the origin of this problem in my replication initialization script: The databases of the replication targets have initially been copied using mariabackup, and after the mariabackup --prepare step there was a chown -R 1001 /bitnami which left all files owned by 1001.root - and this ownership can certainly not be copied by the non-root user 1001.
          Fixing it with a script change into chown -R 1001.1001 /bitnami
          This issue can be closed.

          cgrdhenrik Henrik Steffen added a comment - sorry, I think I just found the origin of this problem in my replication initialization script: The databases of the replication targets have initially been copied using mariabackup, and after the mariabackup --prepare step there was a chown -R 1001 /bitnami which left all files owned by 1001.root - and this ownership can certainly not be copied by the non-root user 1001. Fixing it with a script change into chown -R 1001.1001 /bitnami This issue can be closed.

          Great to hear, @cgrdhenrik! Glad you found the cause, and thanks for updating us with your resolution

          bnestere Brandon Nesterenko added a comment - Great to hear, @ cgrdhenrik ! Glad you found the cause, and thanks for updating us with your resolution

          People

            Unassigned Unassigned
            cgrdhenrik Henrik Steffen
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.