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

Temporary file in stored procedure not created accross galera cluster

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.4.2
    • 11.4
    • Galera SST
    • None
    • Ubuntu Linux

    Description

      In a Galera Cluster, a very old and long running stored procedure creates a temporary file.

      CREATE TEMPORARY TABLE IF NOT EXISTS Stats_Action_Temp ...

      Then proceeds to work the temp file.
      The connected database works correctly.
      However the connected (slave) server does not see or execute the temporary file creation and fails in the sync. The galera sync stops and can only be restart with a server restart and a full rsync

      Error I now get:
      2024-07-11 12:30:01 2 [ERROR] Slave SQL: Error 'Table 'Playback_Stats.Stats_Content_Temp' doesn't exist' on query. Default database:
      'Playback_Stats'. Query: 'INSERT INTO Content_Stats

      Followed by error:
      2024-07-11 12:30:01 2 [ERROR] Slave SQL: Could not execute Write_rows_v1 event on table Playback_Stats.Artist_Stats; Duplicate entry
      '365-ENG-64' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 0,
      Internal MariaDB error code: 1062
      2024-07-11 12:30:01 2 [Warning] WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno 2132
      2024-07-11 12:30:01 0 [Note] WSREP: Member 1(kvmub.hq.amar.com) initiates vote on bfc9aad9-3fa7-11ef-aced-ae734f946aa8:2132,e969322a244c5e36: Duplicate entry '365-ENG-64' for key 'PRIMARY', Error_code: 1062;
      2024-07-11 12:30:01 0 [Note] WSREP: Votes over bfc9aad9-3fa7-11ef-aced-ae734f946aa8:2132:
      e969322a244c5e36: 1/2
      Waiting for more votes.
      2024-07-11 12:30:01 0 [Note] WSREP: Member 0(dbu.hq.amar.com) responds to vote on bfc9aad9-3fa7-11ef-aced-ae734f946aa8:2132,0000000000000000: Success
      2024-07-11 12:30:01 0 [Note] WSREP: Votes over bfc9aad9-3fa7-11ef-aced-ae734f946aa8:2132:
      0000000000000000: 1/2
      e969322a244c5e36: 1/2
      Winner: 0000000000000000
      2024-07-11 12:30:01 2 [ERROR] WSREP: Inconsistency detected: Inconsistent by consensus on bfc9aad9-3fa7-11ef-aced-ae734f946aa8:2132
      at ./galera/src/replicator_smm.cpp:process_apply_error():1370
      2024-07-11 12:30:01 2 [Note] WSREP: Closing send monitor...
      2024-07-11 12:30:01 2 [Note] WSREP: Closed send monitor.
      2024-07-11 12:30:01 2 [Note] WSREP: gcomm: terminating thread
      2024-07-11 12:30:01 2 [Note] WSREP: gcomm: joining thread
      2024-07-11 12:30:01 2 [Note] WSREP: gcomm: closing backend
      2024-07-11 12:30:02 2 [Note] WSREP: view(view_id(NON_PRIM,161ede6b-9789,2) memb

      { 3cf93891-8be8,0 }

      joined {
      } left {
      } partitioned

      { 161ede6b-9789,0 }

      )
      2024-07-11 12:30:02 2 [Note] WSREP: PC protocol downgrade 1 -> 0
      2024-07-11 12:30:02 2 [Note] WSREP: view((empty))
      2024-07-11 12:30:02 2 [Note] WSREP: gcomm: closed
      2024-07-11 12:30:02 0 [Note] WSREP: New COMPONENT: primary = no, bootstrap = no, my_idx = 0, memb_num = 1
      2024-07-11 12:30:02 0 [Note] WSREP: Flow-control interval: [16, 16]
      2024-07-11 12:30:02 0 [Note] WSREP: Received NON-PRIMARY.
      2024-07-11 12:30:02 0 [Note] WSREP: Shifting SYNCED -> OPEN (TO: 2132)
      2024-07-11 12:30:02 0 [Note] WSREP: New SELF-LEAVE.
      2024-07-11 12:30:02 0 [Note] WSREP: Flow-control interval: [0, 0]
      2024-07-11 12:30:02 0 [Note] WSREP: Received SELF-LEAVE. Closing connection.
      2024-07-11 12:30:02 0 [Note] WSREP: Shifting OPEN -> CLOSED (TO: 2132)
      2024-07-11 12:30:02 0 [Note] WSREP: RECV thread exiting 0: Success
      2024-07-11 12:30:02 2 [Note] WSREP: recv_thread() joined.
      2024-07-11 12:30:02 2 [Note] WSREP: Closing send queue.
      2024-07-11 12:30:02 2 [Note] WSREP: Closing receive queue.

      Attachments

        Activity

          People

            janlindstrom Jan Lindström
            laxamar Jacques Amar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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