chore(P2P): Only increment error metric if transport infos of all registry versions are empty#10408
chore(P2P): Only increment error metric if transport infos of all registry versions are empty#10408eichhorl wants to merge 1 commit into
Conversation
|
This works well. Alternatively, I had thought of making an exception in I agree that this would introduce some complexity which could be avoided with your simpler change. But implementing it this way also makes more sense functionality-wise since the consumers of WDYT? |
alin-at-dfinity
left a comment
There was a problem hiding this comment.
Damn, only noticed Pierugo's comment after I hit Approve. My apologies, I thought I was just being helpful.
The peer manager maintains connections to all peers that are in the subnet record in any registry version between the "oldest version in use" and the latest locally available registry version.
The "oldest registry version in use" is determined by the CUP. In case of a subnet creation, this CUP is a registry CUP that contains the registry version just before the subnet was created (see here).
This means that when the peer manager attempts to make connections to peers according to the "oldest registry version in use", the subnet doesn't actually exist yet, which then triggers the
empty_list_of_node_recordserror. This is fine however, because it will find the correct peers in the subsequent registry version (which is guaranteed to exist, otherwise we would not have the registry CUP).To improve the error signal of this metric, we change it such that it is only incremented if all registry versions do not contain transport infos, meaning there are no peers shared with the new subnet topology.