quorum icon indicating copy to clipboard operation
quorum copied to clipboard

Raft doesn't sync if more than 8192 blocks out

Open prd-fox opened this issue 7 years ago • 2 comments

System information

Geth version: 1.8.12 Quorum version: 2.2.0

OS & Version: OSX

Branch, Commit Hash or Release: master

Expected behaviour

A node with Raft consensus should resync with the network, no matter how far behind it is

Actual behaviour

The node does not sync and stays at its last position

Steps to reproduce the behaviour

Create a raft-based network and leave one node offline. Create over 8192 blocks on the other nodes, then bring the offline node online.

prd-fox avatar Jan 03 '19 10:01 prd-fox

The cause seems to be that when performing a "bounded sync" with the network, the cache is only 8192 items large. Further attempts to put something in the cache will block.

We also only read from the cache to process the data after all data is downloaded, not when the cache is full.

Allow data to be processed in parallel to it being downloaded allows the node to sync fully, but some investigation needs to be done as to any side effects.

prd-fox avatar Jan 03 '19 10:01 prd-fox

The cause seems to be that when performing a "bounded sync" with the network, the cache is only 8192 items large. Further attempts to put something in the cache will block.

We also only read from the cache to process the data after all data is downloaded, not when the cache is full.

Allow data to be processed in parallel to it being downloaded allows the node to sync fully, but some investigation needs to be done as to any side effects.

Thanks for the reply, it will be very helpful, if you can share with us your alternative solution like processing downloader in parallel.

louisbao avatar Jan 04 '19 13:01 louisbao