storj/storagenode/orders
Moby von Briesen db480e6e1b storagenode/orders: Improve performance of handling corrupt orders.
This change fixes two things which can make reading from a corrupted
orders file inefficient.
* When a corrupted order is detected, but the underlying error is an
UnexpectedEOF (as opposed to a pb.Unmarshal error, for instance), there
is no point in attempting to read from the file another time to find an
additional uncorrupted order - we will continue to get UnexpectedEOF
errors until we seek to the very end of the file and get a normal EOF.
Instead, when UnexpectedEOF occurs, log and send metrics as with other
types of corruption, but do not attempt to read again.
* When a corrupted order is detected, instead of seeking forward only
one byte for the next attempt, seek forward by the size of entryHeader.
This cuts down on the number of iterations needed to find an uncorrupted
order after detecting a corrupted one.

Change-Id: Ie1a613127e29d29318584ec7f60e8f7554f73487
2020-11-16 14:08:36 +00:00
..
ordersfile storagenode/orders: Improve performance of handling corrupt orders. 2020-11-16 14:08:36 +00:00
db_test.go storagenodedb/orders: select unsent satellite with expiration 2020-10-21 15:02:23 +00:00
service_test.go satellite/orders: rollout phase3 of SettlementWithWindow endpoint 2020-10-26 14:56:28 +00:00
service.go all: fix defers in loop 2020-11-02 15:06:38 +02:00
store_test.go storagenodedb/orders: select unsent satellite with expiration 2020-10-21 15:02:23 +00:00
store.go storagenode/orders: Improve performance of handling corrupt orders. 2020-11-16 14:08:36 +00:00