Project

Profile

Help

Issue #4916

closed

index key is too long for mariadb that uses utf-8 encoding

Added by dkliban@redhat.com over 5 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Pulp RPM needs to support the RPM standard. This means it needs to store package metadata in utf8. This means that on MariaDB the migrations fail with the following traceback. One of our unique together keys is too long.

  Applying rpm.0001_initial...Traceback (most recent call last):
  File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/mysql/base.py", line 71, in execute
    return self.cursor.execute(query, args)
  File "/usr/local/lib/pulp/lib64/python3.6/site-packages/MySQLdb/cursors.py", line 206, in execute
    res = self._query(query)
  File "/usr/local/lib/pulp/lib64/python3.6/site-packages/MySQLdb/cursors.py", line 312, in _query
    db.query(q)
  File "/usr/local/lib/pulp/lib64/python3.6/site-packages/MySQLdb/connections.py", line 224, in query
    _mysql.connection.query(self, query)
MySQLdb._exceptions.OperationalError: (1071, 'Specified key was too long; max key length is 3072 bytes')

Added by dkliban@redhat.com over 5 years ago

Revision 61402ee7 | View on GitHub

Problem: Package's unique together index key is too long

Solution: set shorter max_length for all appropriate fields

This patch reduces the max_length for epoch, arch, pkgId, and checksum_type.

fixes: #4916 https://pulp.plan.io/issues/4916

Actions #1

Updated by dkliban@redhat.com over 5 years ago

  • Status changed from NEW to MODIFIED
Actions #2

Updated by ttereshc almost 5 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF