SUPPORT node: Compare node info during initial bootstrap properly #693

Merged
dstepanov-yadro merged 1 commits from fyrchik/frostfs-node:fix-bootstrap into support/v0.37 2023-09-18 07:30:17 +00:00

Close #691

Checked on dev-env

2023-09-15T14:23:03.476Z        info    frostfs-node/netmap.go:231      the node is already in candidate list with online state, skip initial bootstrap
Close #691 Checked on dev-env ``` 2023-09-15T14:23:03.476Z info frostfs-node/netmap.go:231 the node is already in candidate list with online state, skip initial bootstrap ```
fyrchik force-pushed fix-bootstrap from a60420886d to 31c065546e 2023-09-15 14:31:33 +00:00 Compare
fyrchik requested review from storage-core-committers 2023-09-15 14:31:53 +00:00
fyrchik requested review from storage-core-developers 2023-09-15 14:31:57 +00:00
aarifullin reviewed 2023-09-15 15:49:08 +00:00
@ -290,0 +329,4 @@
return false
})
if len(esA) != len(esB) {
Collaborator

What about return slices.Equal?

What about `return slices.Equal`?
Poster
Owner

Is it present in go1.20?

Is it present in go1.20?
Collaborator

I think it is presented since go1.17 as generics (or 18?) appeared. If it is not, let's keep like that

I think it is presented since go1.17 as generics (or 18?) appeared. If it is not, let's keep like that
Poster
Owner

It was moved to stdlib in 1.21 https://tip.golang.org/doc/go1.21#slices, previously was in /x/exp

It was moved to stdlib in 1.21 https://tip.golang.org/doc/go1.21#slices, previously was in /x/exp
Collaborator

Ah, ok then

Ah, ok then
fyrchik marked this conversation as resolved
aarifullin approved these changes 2023-09-15 15:55:26 +00:00
acid-ant approved these changes 2023-09-17 07:34:12 +00:00
@ -290,0 +305,4 @@
}
count++
})
return allMatched && count == len(asA)
Collaborator

Should we take into account locode attributes in asA?

Should we take into account `locode` attributes in `asA`?

As I understand it, locode attributes are added from the locode database, so they are not in the local config.

As I understand it, `locode` attributes are added from the locode database, so they are not in the local config.
dstepanov-yadro approved these changes 2023-09-18 07:05:31 +00:00
@ -287,3 +285,1 @@
rawA := a.Marshal()
rawB := b.Marshal()
return bytes.Equal(rawA, rawB)
func needsUpdate(local, remote *netmapSDK.NodeInfo) bool {

The function should be named "noUpdateRequired"

The function should be named "noUpdateRequired"
dstepanov-yadro requested review from JuliaKovshova 2023-09-18 07:07:29 +00:00
JuliaKovshova approved these changes 2023-09-18 07:29:45 +00:00
dstepanov-yadro merged commit 368774be95 into support/v0.37 2023-09-18 07:30:17 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#693
There is no content yet.