graphprotocol / graphprotocol/graph-node
[Bug] Incorrect graft copy percentage logging
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 1.1k
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
Description
Bug report
When doing a graft, the calculated copy percentage isn't correct. I see 100% of overall data is copied several back to back log lines but that's clearly not the case considering how much extra data there is to copy. Maybe it's an issue with rounding? This is happening on v0.34.0
Relevant log output
"Copied 62.83% of `_LiquidityPoolAmount` entities (31669552/50408382 entity versions), 100.00% of overall data, dst: sgd50978, sgd: 50978, subgraph_id: QmNnGrNgUbZrwCvxRJ9ZjdmfzaLtAaXSm9WAzxhwp3YsC6, component: SubgraphInstanceManager"
"Copied 59.85% of `_LiquidityPoolAmount` entities (30171286/50408382 entity versions), 100.00% of overall data, dst: sgd50978, sgd: 50978, subgraph_id: QmNnGrNgUbZrwCvxRJ9ZjdmfzaLtAaXSm9WAzxhwp3YsC6, component: SubgraphInstanceManager"
"Copied 56.93% of `_LiquidityPoolAmount` entities (28697880/50408382 entity versions), 100.00% of overall data, dst: sgd50978, sgd: 50978, subgraph_id: QmNnGrNgUbZrwCvxRJ9ZjdmfzaLtAaXSm9WAzxhwp3YsC6, component: SubgraphInstanceManager"
"Copied 53.86% of `_LiquidityPoolAmount` entities (27149638/50408382 entity versions), 100.00% of overall data, dst: sgd50978, sgd: 50978, subgraph_id: QmNnGrNgUbZrwCvxRJ9ZjdmfzaLtAaXSm9WAzxhwp3YsC6, component: SubgraphInstanceManager"
"Copied 50.75% of `_LiquidityPoolAmount` entities (25581513/50408382 entity versions), 100.00% of overall data, dst: sgd50978, sgd: 50978, subgraph_id: QmNnGrNgUbZrwCvxRJ9ZjdmfzaLtAaXSm9WAzxhwp3YsC6, component: SubgraphInstanceManager"
"Copied 47.63% of `_LiquidityPoolAmount` entities (24009404/50408382 entity versions), 99.84% of overall data, dst: sgd50978, sgd: 50978, subgraph_id: QmNnGrNgUbZrwCvxRJ9ZjdmfzaLtAaXSm9WAzxhwp3YsC6, component: SubgraphInstanceManager"
"Copied 44.52% of `_LiquidityPoolAmount` entities (22443819/50408382 entity versions), 99.51% of overall data, dst: sgd50978, sgd: 50978, subgraph_id: QmNnGrNgUbZrwCvxRJ9ZjdmfzaLtAaXSm9WAzxhwp3YsC6, component: SubgraphInstanceManager"
"Copied 41.44% of `_LiquidityPoolAmount` entities (20890187/50408382 entity versions), 99.19% of overall data, dst: sgd50978, sgd: 50978, subgraph_id: QmNnGrNgUbZrwCvxRJ9ZjdmfzaLtAaXSm9WAzxhwp3YsC6, component: SubgraphInstanceManager"
IPFS hash
No response
Subgraph name or link to explorer
No response
Some information to help us out
- Tick this box if this bug is caused by a regression found in the latest release.
- Tick this box if this bug is specific to the hosted service.
- I have searched the issue tracker to make sure this issue is not a duplicate.
OS information
None
Contributor guide
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 at the SubgraphInstanceManager graft-copy logging path and compare the counters used for entity and overall percentages against the supplied v0.34.0 log output. Reproduce consecutive copy-progress lines; done when the overall percentage reflects remaining data instead of reporting 100% while entity copying is incomplete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100