Uploaded image for project: 'MusicBrainz Search Server'
  1. MusicBrainz Search Server
  2. SEARCH-507

Indexer should retry query when there is a conflict with recovery

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2018-06-22 First Solr
    • Component/s: Indexer
    • Labels:
      None

      Description

      See https://sentry.metabrainz.org/metabrainz/solr/issues/365/ (https://sentry.metabrainz.org/share/issue/31302e333635):

      OperationalError: (psycopg2.extensions.TransactionRollbackError) terminating connection due to conflict with recovery
       DETAIL: User query might have needed to see row versions that must be removed.
       HINT: In a moment you should be able to reconnect to the database and repeat your command.
       ERROR: server conn crashed?
       server closed the connection unexpectedly
       This probably means the server terminated abnormally
       before or while processing the request.
       [SQL: 'SELECT musicbrainz.release_group_secondary_type_join.release_group AS musicbrainz_release_group_secondary_type_join_release_group, musicbrainz.release_group_secondary_type_join.secondary_type AS musicbrainz_release_group_secondary_type_join_secondary_type, release_group_1.id AS release_group_1_id, release_group_secondary_type_1.parent AS release_group_secondary_type_1_parent, release_group_secondary_type_1.id AS release_group_secondary_type_1_id, release_group_secondary_type_1.name AS release_group_secondary_type_1_name \nFROM (SELECT musicbrainz.recording.id AS musicbrainz_recording_id \nFROM musicbrainz.recording \nWHERE musicbrainz.recording.id >= %(id_1)s AND musicbrainz.recording.id < %(id_2)s) AS anon_1 JOIN musicbrainz.track AS track_1 ON anon_1.musicbrainz_recording_id = track_1.recording JOIN musicbrainz.medium AS medium_1 ON medium_1.id = track_1.medium JOIN musicbrainz.release AS release_1 ON release_1.id = medium_1.release JOIN musicbrainz.release_group AS release_group_1 ON release_group_1.id = release_1.release_group JOIN musicbrainz.release_group_secondary_type_join ON release_group_1.id = musicbrainz.release_group_secondary_type_join.release_group JOIN musicbrainz.release_group_secondary_type AS release_group_secondary_type_1 ON release_group_secondary_type_1.id = musicbrainz.release_group_secondary_type_join.secondary_type ORDER BY release_group_1.id'] [parameters:{'id_2': 167815, 'id_1': 136829}]
      

      This issue occurs only when indexer is connected to a slave database (pgbouncer).

      Additional details: https://github.com/metabrainz/sir/pull/11#discussion_r98358534.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            roman Roman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                2018-06-22 First Solr