Skip to content

Commit 7bf6bea

Browse files
vitarbalexshtin
authored andcommitted
Fix the bug with 1.1 startup on Mysql after the upgrade (temporalio#879)
1 parent 6c6c87b commit 7bf6bea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

common/persistence/cassandra/cassandraClusterMetadata.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func (m *cassandraClusterMetadata) GetClusterMetadata() (*p.InternalGetClusterMe
159159
return nil, convertCommonErrors("GetClusterMetadata", err)
160160
}
161161
// TODO(vitarb): immutable metadata is needed for backward compatibility only, remove after 1.1 release.
162-
if clusterMetadata == nil {
162+
if len(clusterMetadata) == 0 {
163163
clusterMetadata = immutableMetadata
164164
encoding = immutableMetadataEncoding
165165
// Version can only be 0 for legacy records that have NULL version in the DB.

common/persistence/sql/sqlClusterMetadataManager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func (s *sqlClusterMetadataManager) GetClusterMetadata() (*p.InternalGetClusterM
5151
}
5252

5353
// TODO(vitarb): immutable metadata is needed for backward compatibility only, remove after 1.1 release.
54-
if row.Data == nil {
54+
if len(row.Data) == 0 {
5555
row.Data = row.ImmutableData
5656
row.DataEncoding = row.ImmutableDataEncoding
5757
}

0 commit comments

Comments
 (0)