storj/satellite
Isaac Hess d5d0c442ac satellite/accounting/rollup: Use lastRollup as zero-value
In satellite/accounting/rollup Service.RollupStorage we have a few
potential error scenarios that return time.Now(). Especially in the case
where we exit early because we have received 0 tallies since the *last*
rollup, this creates a potential race condition.

Between the time we call GetTalliesSince and realize it is empty, it's
possible a tally was inserted in that interval. As currently written we
are returning a latestTally time that excludes that tally.

We are currently protected because in Service.Rollup we don't save the
rollup unless we have populated the rollupStats. However, this change is
more correct and future-proof, because Service.RollupStorage should
always return a correct latestTally time, which in case of errors and
empty tallies, is the last successful tally.

Change-Id: I2521a2cc9802c8f06e512dde4422803a272e2a0a
2019-12-18 21:33:33 +00:00
..
accounting satellite/accounting/rollup: Use lastRollup as zero-value 2019-12-18 21:33:33 +00:00
attribution storagenode/notifications: db created (#3707) 2019-12-16 19:59:01 +02:00
audit satellite/audit: do not report offline to overlay (#3547) 2019-12-18 04:51:24 -06:00
console private/testcontext: ensure we call cleanup everywhere 2019-12-17 14:16:09 +00:00
contact satellite/nodeselection: don't select nodes that haven't checked in for a while (#3567) 2019-11-15 23:43:06 +01:00
dbcleanup private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
gc private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
gracefulexit {storagenode,satellite}/gracefulexit: ensure workers finish their work 2019-12-17 17:21:52 +02:00
inspector private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
mailservice satellite/mailservice: move logging to send rendered async to cover template parsing (#3654) 2019-11-28 12:29:48 +02:00
marketingweb satellitedb: fix migration cockroach test 2019-12-16 18:02:31 +00:00
metainfo satellite/metainfo: use KnownReliable in DeleteObjectPieces 2019-12-18 12:38:22 +00:00
metrics private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
nodestats all: use pkg/rpc instead of pkg/transport 2019-09-25 15:37:06 -06:00
orders satellite/metainfo, satellite/repair, uplink/eestream: add metric for download failed due to not enough pieces available (#3665) 2019-12-04 16:24:36 -05:00
overlay satellite/metainfo: use KnownReliable in DeleteObjectPieces 2019-12-18 12:38:22 +00:00
payments satellite/payments/tokens: return checkout url on new deposit (#3696) 2019-12-12 15:09:19 +02:00
referrals satellite: adds and enables cockroachdb compatibility for tests 2019-12-16 22:29:25 +00:00
repair satellite: adds and enables cockroachdb compatibility for tests 2019-12-16 22:29:25 +00:00
rewards satellite: adds and enables cockroachdb compatibility for tests 2019-12-16 22:29:25 +00:00
satellitedb satellite/overlay: filter reliable nodes from a list 2019-12-17 21:20:08 +00:00
vouchers private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
api.go satellite: Create method for deleting pieces of SNs 2019-12-18 10:38:16 +01:00
core.go satellite/payments: coupons and coupon usage (#3648) 2019-11-26 19:58:51 +02:00
peer.go private,satellite: unite all the "temp db schema" things 2019-12-05 15:36:59 +00:00
repairer.go private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00