Skip to content

Commit

Permalink
One more improvement from review
Browse files Browse the repository at this point in the history
Overlooked fixup
  • Loading branch information
MikeSpreitzer committed Feb 12, 2020
1 parent d5a572c commit fb1d177
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions staging/kos/pkg/apis/network/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ func (writes WriteSet) SetWrite(section string, serverTime Timestamp) WriteSet {
func (writes WriteSet) Diff(others WriteSet) WriteSet {
ans := make(WriteSet, 0, len(writes))
for _, wr := range writes {
owr, _ := others.GetWrite(wr.Section)
if owr == (ObjectWrite{}) {
_, found := others.GetWrite(wr.Section)
if !found {
ans = append(ans, wr)
}
}
Expand Down
4 changes: 2 additions & 2 deletions staging/kos/pkg/apis/network/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ func (writes WriteSet) SetWrite(section string, serverTime Timestamp) WriteSet {
func (writes WriteSet) Diff(others WriteSet) WriteSet {
ans := make(WriteSet, 0, len(writes))
for _, wr := range writes {
owr, _ := others.GetWrite(wr.Section)
if owr == (ObjectWrite{}) {
_, found := others.GetWrite(wr.Section)
if !found {
ans = append(ans, wr)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ func (ca *ConnectionAgent) updateLocalAttachmentStatus(att *netv1a1.NetworkAttac
updatedAtt.Status.PostCreateExecReport)

if att.Status.HostIP == "" {
ca.attachmentCreateToStatusHistogram.Observe(updatedAtt.Writes.GetServerWriteTime(netv1a1.NASectionAddr).Sub(att.Writes.GetServerWriteTime(netv1a1.NASectionSpec)).Seconds())
ca.attachmentCreateToStatusHistogram.Observe(updatedAtt.Writes.GetServerWriteTime(netv1a1.NASectionImpl).Sub(att.Writes.GetServerWriteTime(netv1a1.NASectionSpec)).Seconds())
}

return nil
Expand Down

0 comments on commit fb1d177

Please sign in to comment.