chifra export: Unexpected results when running multiple exports concurrently
Hi
I have noticed that if I'm running export for several addresses concurrently I get different appearances count (smaller) than running them sequentially. Example of requests below. Is this a known issue?
export?addrs=0x489a0f8be88d6025c88ce431636e7df60518df68&appearances&count
export?addrs=0xf0c55da3a8274f6843434df0da437ed4ac0dd310&appearances&count
export?addrs=0x1b52a2f30b17b1036b9b289a057c72380c3c4a3a&appearances&count
Thanks in advance
Do you think it’s duplicates? I it’s highly likely that we remove duplicates.
Thomas Jay Rush @.***
On Apr 7, 2022, at 7:18 AM, Max @.***> wrote:
Hi
I have noticed that if I'm running export for several addresses concurrently I get different appearances count (smaller) than running them sequentially. Example of requests below. Is this a known issue?
export?addrs=0x489a0f8be88d6025c88ce431636e7df60518df68&appearances&count export?addrs=0xf0c55da3a8274f6843434df0da437ed4ac0dd310&appearances&count export?addrs=0x1b52a2f30b17b1036b9b289a057c72380c3c4a3a&appearances&count Thanks in advance
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
@tjayrush what do you mean by duplicates?
@tjayrush Any advice?
Just so I can make sure we're dealing with the same test case. Can you run this (after starting chifra serve) and report results?
curl "http://localhost:8080/export?appearances&count&addrs=0x489a0f8be88d6025c88ce431636e7df60518df68&fmt=txt"
curl "http://localhost:8080/export?appearances&count&addrs=0xf0c55da3a8274f6843434df0da437ed4ac0dd310&fmt=txt"
curl "http://localhost:8080/export?appearances&count&addrs=0x1b52a2f30b17b1036b9b289a057c72380c3c4a3a&fmt=txt"
curl "http://localhost:8080/export?appearances&count&addrs=0x489a0f8be88d6025c88ce431636e7df60518df68%200xf0c55da3a8274f6843434df0da437ed4ac0dd310%200x1b52a2f30b17b1036b9b289a057c72380c3c4a3a&fmt=txt"```
which, for me, produces this result (your numbers will vary if you run this later, but the consistent answers should be the same):
address nrecords filesize
0x489a0f8be88d6025c88ce431636e7df60518df68 1266 10136
address nrecords filesize
0xf0c55da3a8274f6843434df0da437ed4ac0dd310 821 6576
address nrecords filesize
0x1b52a2f30b17b1036b9b289a057c72380c3c4a3a 2539 20320
address nrecords filesize
0x489a0f8be88d6025c88ce431636e7df60518df68 1266 10136
0xf0c55da3a8274f6843434df0da437ed4ac0dd310 821 6576
0x1b52a2f30b17b1036b9b289a057c72380c3c4a3a 2539 20320
which looks correct to me. Maybe I'm misunderstanding your problem.
If this doesn't cover your problem, please correct the test case and post the entire thing here.
Now that I re-read your original query, you mention concurrently. Can you provide a test case where you do that? (Mine above is not concurrent, I notice now.)
@tjayrush
Sorry, let me explain STR
- Run below requests concurrently
curl "http://localhost:8080/export?appearances&count&addrs=0x489a0f8be88d6025c88ce431636e7df60518df68&fmt=txt"
curl "http://localhost:8080/export?appearances&count&addrs=0xf0c55da3a8274f6843434df0da437ed4ac0dd310&fmt=txt"
curl "http://localhost:8080/export?appearances&count&addrs=0x1b52a2f30b17b1036b9b289a057c72380c3c4a3a&fmt=txt"
- Check nRecords
- Clear .local/share/trueblocks/cache
- Run requests sequentially
- Compare the nRecords
For me nRecords will be different (more nRecords when running concurrently)
@tjayrush what do you think?
Thanks for this. I'm going to have to ask you for a favor. How would one run the above curl commands 'concurrently'? (Sorry I'm not good at Javascript, TypeScript, or Go at all -- can you provide a very simple test harness that eliminates all but the very essence of the problem while still demonstrating the problem?
But if you do, please make sure to remove all 'extraneous' stuff so we can be certain that we're dealing with a problem that is clearly with TrueBlocks.
I'm not trying to "push you off", but we're not seeing any issue in our testing -- not that our testing is perfect -- but if you can help me get an easy to debug test case, the chance of me fixing it goes up dramatically.
Sorry for the continued delay...
I ran this test
curl "http://localhost:8080/export?appearances&count&addrs=0x489a0f8be88d6025c88ce431636e7df60518df68&fmt=txt" &
curl "http://localhost:8080/export?appearances&count&addrs=0xf0c55da3a8274f6843434df0da437ed4ac0dd310&fmt=txt" &
curl "http://localhost:8080/export?appearances&count&addrs=0x1b52a2f30b17b1036b9b289a057c72380c3c4a3a&fmt=txt" &
sleep 2
curl "http://localhost:8080/export?appearances&count&addrs=0x489a0f8be88d6025c88ce431636e7df60518df68&fmt=txt"
sleep 2
curl "http://localhost:8080/export?appearances&count&addrs=0xf0c55da3a8274f6843434df0da437ed4ac0dd310&fmt=txt"
sleep 2
curl "http://localhost:8080/export?appearances&count&addrs=0x1b52a2f30b17b1036b9b289a057c72380c3c4a3a&fmt=txt"
You'll notice that the first three lines run each of the curl commands in the background (and therefore "concurrently"?).
The remaining three lines run the same commands sequentially and sleep in between.
We get these results:
address nrecords filesize
0xf0c55da3a8274f6843434df0da437ed4ac0dd310 1031 8256
address nrecords filesize
0x489a0f8be88d6025c88ce431636e7df60518df68 1489 11920
address nrecords filesize
0x1b52a2f30b17b1036b9b289a057c72380c3c4a3a 2941 23536
address nrecords filesize
0x489a0f8be88d6025c88ce431636e7df60518df68 1489 11920
address nrecords filesize
0xf0c55da3a8274f6843434df0da437ed4ac0dd310 1031 8256
address nrecords filesize
0x1b52a2f30b17b1036b9b289a057c72380c3c4a3a 2941 23536
Which is as I would expect.
Since I can't reproduce the problem you're seeing, I am going to close this. If you wish to re-open it, please do, but please provide a reproducable test.