Bitbucket Server reports some data has been truncated

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Problem

In <BITBUCKET_HOME>/log/atlassian-bitbucket.log, Bitbucket Server reports that some data has been truncated during upgrade :

2015-09-10 15:01:51,921 WARN [main] c.a.b.a.AbstractTruncateColumnSubtask Data has been truncated in table BRANCH_MODEL, number of rows affected: 5. The original data was saved to file '/atlassian-bitbucket-home/shared/BRANCH_MODEL-original-data.csv'. For more information, see http://go.atlassian.com/bitbucketserverdatatruncation

Cause

In Bitbucket Server 4.0, the maximum length of some database columns was changed from 767 to 450 characters. Bitbucket had to truncate some of the values stored in those columns to fit them into the new size limits. A backup of the original data for the affected rows was exported to a CSV file at <BITBUCKET_HOME>/shared/<TABLE_NAME>-original-data.csv.

The following columns were resized:

  • Table BRANCH_MODEL:

    • DEV_ID - A repository's development branch, used to determine branch permissions
    • PROD_ID - A repository's production/stable branch, used to determine branch permissions
  • Table BRANCH_TYPE:
    • PREFIX - The user-configurable prefix that identifies a branch type
    • TYPE_ID - The type of branch identified by the prefix
  • Table REJECTED_REF:
    • REF_DISPLAY_ID - The name of a branch that has failed ref synchronization
    • REF_ID - The ID of a branch that has failed ref synchronization

Resolution

Check which rows have been truncated by browsing the CSV file mentioned in the log message.

If any values in the BRANCH_MODEL or REJECTED_REF tables were truncated, consider changing the corresponding git references in your repository so they are shorter than 450 characters.

If any values in the BRANCH_TYPE table were truncated, consider changing the branch type prefixes so that they are shorter than 450 characters.

Last modified on Apr 6, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.