graphprotocol / graph-node

Graph Node indexes data from blockchains such as Ethereum and serves it over GraphQL
https://thegraph.com
Apache License 2.0
2.9k stars 968 forks source link

[Bug] Incorrect graft copy percentage logging #5356

Open paymog opened 5 months ago

paymog commented 5 months ago

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

OS information

None

azf20 commented 5 months ago

thanks @paymog - can you share any information about the subgraph which was being grafted (or grafted on)? @lutter any ideas on this one?

paymog commented 5 months ago

I think this was one of the messari uniswap subgraphs but tbh I can't remember precisely

lutter commented 5 months ago

Was the graph-node restarted while the copy operation was running? There was an issue that I thought I had fixed where resuming the copy operation would report the wrong percentage.

Just to be explicit: those wrong percentages don't affect how copy is done, but it is an annoying UI bug

paymog commented 5 months ago

I don’t know for sure if there was a restart but there’s a very high probability that there was.

Yup, not worried about the operation being affected, just reporting the UI/UX bug here.