Skip to content

fix(metrics): remove deprecated FECShortShards and add new KCP metrics#39

Open
moralpriest wants to merge 1 commit into
DEROFDN:community-devfrom
moralpriest:fix/kcp-metrics-update
Open

fix(metrics): remove deprecated FECShortShards and add new KCP metrics#39
moralpriest wants to merge 1 commit into
DEROFDN:community-devfrom
moralpriest:fix/kcp-metrics-update

Conversation

@moralpriest

Copy link
Copy Markdown

What

Remove deprecated KCP_FECShortShards metric and add 7 new KCP SNMP metrics, vendoring kcp-go v5.6.72 to support them.

Why

  • kcp-go v5.6.72 removed the FECShortShards field from its Snmp struct, causing a compile error against the current vendored copy (~2020)
  • The new version adds 7 new fields: FECFullShardSet, FECShardSet, FECShardMin, RingBufferSndQueue, RingBufferRcvQueue, RingBufferSndBuffer, OOBPackets
  • This PR vendors kcp-go v5.6.72 to make all 30 Snmp fields available, preparing for the eventual go.mod modernization

Changes

Area Change
metrics/metrics.go Removed KCP_FECShortShards; added 7 new metrics; grouped imports
vendor/github.com/xtaci/kcp-go/v5/ Replaced old vendored copy with v5.6.72 (29 .go files)
vendor/github.com/templexxx/ Deleted dead deps (only old kcp-go imported them)
go.mod / go.sum Not modified — still go 1.17, no go.sum

Verification

  • API compatibility verified: all kcp-go symbols used by metrics.go and p2p/controller.go have identical signatures in v5.6.72
  • go build ./metrics/ ./p2p/ — passes
  • go vet ./metrics/ ./p2p/ — passes
  • go test ./metrics/ ./p2p/ — passes
  • Runtime render test confirms all 9 KCP metrics appear and KCP_FECShortShards is absent
  • go 1.17 directive does not block kcp-go v5.6.72's generics (each module uses its own go directive)

Notes

- Remove deprecated KCP_FECShortShards metric (field removed in kcp-go v5.6.72)
- Add new KCP SNMP metrics: FECFullShardSet, FECShardSet, FECShardMin,
  RingBufferSndQueue, RingBufferRcvQueue, RingBufferSndBuffer, OOBPackets
- Vendor kcp-go v5.6.72 (replaces old ~2020 vendored copy) without touching go.mod
- Drop dead vendored deps github.com/templexxx/cpu and templexxx/xorsimd
  (only imported by the old kcp-go; new version uses klauspost/cpuid/v2)

All 30 Snmp struct fields are now exported. Preparatory work for the
eventual go.mod modernization (PR DEROFDN#19).

API compatibility verified: kcp-go v5.6.72 symbol signatures used by
metrics.go and p2p/controller.go are identical to the prior version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant