Skip to content

Commit

Permalink
Fix the bug with 1.1 startup on Mysql after the upgrade (#879)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitarb authored and alexshtin committed Oct 20, 2020
1 parent 6c6c87b commit 7bf6bea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/persistence/cassandra/cassandraClusterMetadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (m *cassandraClusterMetadata) GetClusterMetadata() (*p.InternalGetClusterMe
return nil, convertCommonErrors("GetClusterMetadata", err)
}
// TODO(vitarb): immutable metadata is needed for backward compatibility only, remove after 1.1 release.
if clusterMetadata == nil {
if len(clusterMetadata) == 0 {
clusterMetadata = immutableMetadata
encoding = immutableMetadataEncoding
// Version can only be 0 for legacy records that have NULL version in the DB.
Expand Down
2 changes: 1 addition & 1 deletion common/persistence/sql/sqlClusterMetadataManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (s *sqlClusterMetadataManager) GetClusterMetadata() (*p.InternalGetClusterM
}

// TODO(vitarb): immutable metadata is needed for backward compatibility only, remove after 1.1 release.
if row.Data == nil {
if len(row.Data) == 0 {
row.Data = row.ImmutableData
row.DataEncoding = row.ImmutableDataEncoding
}
Expand Down

0 comments on commit 7bf6bea

Please sign in to comment.