macula_wire_tolerance (macula v16.0.0)

View Source

What this node's frame reader tolerated from newer peers instead of closing a link (docs/design/WIRE_1_0.md section 8, macula#83 decisions 5, 6 and 8), counted node-wide so an operator sees when the fleet speaks something this node does not:

  • wire_unknown_frame_type: a frame of a type this node does not know, dropped (no label);
  • wire_ext_ignored: a non-critical extension this node does not know, ignored, labelled by the extension's name;
  • wire_ext_refused: a critical extension this node does not know, whose frame was dropped, labelled by the extension's name;
  • wire_enum_fallback: a per-hop enum value this node does not know, read as its fallback, labelled by the field's name.

An extension name comes from a peer, so the labels it makes are bounded: past 64 distinct names under a counter, a new one counts there under the label other.

The table belongs to macula_peering_sup, which creates it with new_table/0, as macula_peer_versions' is. There is no process here: every count goes to the table directly, so no reader queues on it.

Summary

Functions

Count one frame of a type this node does not know.

Count one ignored or refused extension, by its name, or one enum fallback, by its field.

Every count since the table was created, keyed by counter, or by counter and label.

Create the table, owned by the calling process: macula_peering_sup, whose life is the run's.

Types

counter/0

-type counter() :: wire_unknown_frame_type | wire_ext_ignored | wire_ext_refused | wire_enum_fallback.

label/0

-type label() :: binary() | atom().

Functions

count(_)

-spec count(wire_unknown_frame_type) -> ok.

Count one frame of a type this node does not know.

count(Counter, Name)

-spec count(wire_ext_ignored | wire_ext_refused | wire_enum_fallback, label()) -> ok.

Count one ignored or refused extension, by its name, or one enum fallback, by its field.

counters()

-spec counters() -> #{counter() | {counter(), label()} => non_neg_integer()}.

Every count since the table was created, keyed by counter, or by counter and label.

new_table()

-spec new_table() -> ok.

Create the table, owned by the calling process: macula_peering_sup, whose life is the run's.