Node::diff comparison failure
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 248
- Forks
- 72
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 15
Description
First off, I don't have a good reproducer for this but I want to mention it anyway. When making the partitioner and now with the TopologyMetadata test case, I found it was necessary to either implement my own Node comparison function or introduce other workarounds.
Sometimes Node::diff will indicate that nodes are equal when they are not equal.
Most recently, this came up in the TopologyMetadata CI test case where it turns the TopologyMetadata into a Node (with lots of subtrees) and I found that when I compared my in-memory Node vs one read from relay, they would compare as equal according to Node::diff. When making a CI test case, this is great - you think you're good because there were no differences. I found through other means though that some of my maps were wrong and this should have been flagged by Node::diff. I came up with a workaround in the compare_baseline() function where I can write my in-memory node to a file, read it back, and then compare against the read-in baseline and then Node::diff shows any differences reliably.
The nodes that failed to compare properly were arrays of index_t.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining Node::diff and the TopologyMetadata CI test case, including the compare_baseline() workaround described in the issue. Focus on cases involving arrays of index_t; done means reliably detecting differences between in-memory and relayed nodes, with a regression test for the failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100