Skip to content

Commit

Permalink
spanconfig: replace all usages of raw InternalValue with ToUint64
Browse files Browse the repository at this point in the history
Release note: None
  • Loading branch information
arulajmani committed Feb 15, 2022
1 parent c034e26 commit f78be51
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/spanconfig/systemtarget.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ func (st SystemTarget) encode() roachpb.Span {
k = keys.SystemSpanConfigEntireKeyspace
} else if st.SourceTenantID == roachpb.SystemTenantID {
k = encoding.EncodeUvarintAscending(
keys.SystemSpanConfigHostOnTenantKeyspace, st.TargetTenantID.InternalValue,
keys.SystemSpanConfigHostOnTenantKeyspace, st.TargetTenantID.ToUint64(),
)
} else {
k = encoding.EncodeUvarintAscending(
keys.SystemSpanConfigSecondaryTenantOnEntireKeyspace, st.SourceTenantID.InternalValue,
keys.SystemSpanConfigSecondaryTenantOnEntireKeyspace, st.SourceTenantID.ToUint64(),
)
}
return roachpb.Span{Key: k, EndKey: k.PrefixEnd()}
Expand Down Expand Up @@ -143,7 +143,7 @@ func (st SystemTarget) less(ot SystemTarget) bool {
return false
}

return st.TargetTenantID.InternalValue < ot.TargetTenantID.InternalValue
return st.TargetTenantID.ToUint64() < ot.TargetTenantID.ToUint64()
}

if st.SourceTenantID == roachpb.SystemTenantID {
Expand All @@ -152,7 +152,7 @@ func (st SystemTarget) less(ot SystemTarget) bool {
return false
}

return st.SourceTenantID.InternalValue < ot.SourceTenantID.InternalValue
return st.SourceTenantID.ToUint64() < ot.SourceTenantID.ToUint64()
}

// equal returns true iff the receiver is equal to the supplied system target.
Expand Down

0 comments on commit f78be51

Please sign in to comment.