Closed spikeekips closed 5 years ago
It causes the dumped data does not from same leveldb snapshot.
Does not what ?
@Geod24 Does not what?
DB.GetIterator
acts like listing HTTP API. It does not use real iterator and snapshot. In every request, it creates a new snapshot. Simply like this,
[0, 1, 2, 3]
DB.GetIterator
with the limit, 3[0,1, 2]
[0, 1, 3, 4, 5, 2]
DB.GetIterator
with the limit, 3 and cursor 2
[]
instead of [3, 4]
The
DB.Getiterator
with empty prefix produces all the data, but a node fails with this data sometimes. It causes the dumped data does not from same leveldb snapshot.