Skip to content

fw: recompute virtual FIB depth after pruning - #208

Open
Harsh23Kashyap wants to merge 1 commit into
named-data:mainfrom
Harsh23Kashyap:fix/fib-virtual-depth
Open

Harsh23Kashyap wants to merge 1 commit into
named-data:mainfrom
Harsh23Kashyap:fix/fib-virtual-depth

Conversation

@Harsh23Kashyap

Copy link
Copy Markdown

Fixes #207

pruneTables was recomputing a virtual node's maximum depth from the old maximum, which meant the value could never decrease after the longest real name was removed. Resetting it before scanning the remaining names keeps the virtual-node metadata in sync.

The regression test inserts depth-3 and depth-4 names under the same virtual prefix, removes the depth-4 name, and checks that the stored maximum becomes 3.

Tests:

  • go test ./fw/table -run TestPruneRecomputesVirtualDepth_HT -count=1 (twice)
  • go test ./fw/table -count=1
  • go test ./... -count=1

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.

FIB pruning leaves stale virtual-node maximum depth

1 participant