Bitbucket Server reports some data has been truncated
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
問題
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
原因
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 permissionsPROD_ID
- A repository's production/stable branch, used to determine branch permissions
Table BRANCH_TYPE:
PREFIX
- The user-configurable prefix that identifies a branch typeTYPE_ID
- The type of branch identified by the prefix
Table REJECTED_REF:
REF_DISPLAY_ID
- The name of a branch that has failed ref synchronizationREF_ID
- The ID of a branch that has failed ref synchronization
ソリューション
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.