Skip to content

Commit

Permalink
fix nodes cleanup after reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-rosianu committed Oct 25, 2023
1 parent c22ab6c commit 2b146b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
14 changes: 3 additions & 11 deletions cmd/proxy/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@
Address = "http://127.0.0.1:8082"

[[Observers]]
ShardId = 1
Address = "http://127.0.0.1:8083"
IsFallback = true

[[FullHistoryNodes]]
ShardId = 0
Address = "http://127.0.0.1:8081"

[[FullHistoryNodes]]
ShardId = 1
Address = "http://127.0.0.1:8082"
ShardId = 4294967295
Address = "http://127.0.0.1:8083
IsFallback = false
1 change: 1 addition & 0 deletions observer/baseNodeProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ func (bnp *baseNodeProvider) ReloadNodes(nodesType data.NodeType) data.NodesRelo
bnp.mutNodes.Lock()
bnp.shardIds = getSortedShardIDsSlice(newNodes)
bnp.syncedNodes, bnp.syncedFallbackNodes = initAllNodesSlice(newNodes)
bnp.outOfSyncNodes, bnp.outOfSyncFallbackNodes = make([]*data.NodeData, 0), make([]*data.NodeData, 0)
bnp.lastSyncedNodes = make(map[uint32]*data.NodeData)
bnp.mutNodes.Unlock()

Expand Down

0 comments on commit 2b146b1

Please sign in to comment.