Mattermost Server panic on compliance export

Description

Environment

  • Mattermost Server: 5.20.1

Steps to Reproduce

1. Run a compliance export

Expected Behavior

Compliance export runs successfully or fails with an error

Observed Behavior

Mattermost server crashes, and all servers in the cluster need to be restarted to restore functionality

No errors are output to mattermost.log but sudo journalctl -u mattermost.service --since "2020-03-9 23:45:00" > /tmp/mattermost.log outputs this:

Full details available in the Sustained Engineering channel here

QA Test Steps

This is a bit difficult to test, because it depends on certain conditions to be satisfied for it to reproduce. A unit test is ideal for this, which is already included in the PR.

To confirm this does not introduce a regression, any testing around the compliance job would suffice.

Mana

None

Assignee

Agniva De Sarker

QA Assignee

Jelena Gilliam

Reporter

Paul Rothrock

Epic Link

None

Fix versions

Mattermost Team

Sustained Engineering

Sprint

None

QA Testing Areas

Compliance

GitHub Issue

None

Components

None

Severity

S1_data_loss_or_crash
Configure