storj/satellite/reputation
paul cannon 799b159bba satellite/reputation: offset write times by random, not by satelliteID
In an effort to distribute load on the reputation database, the
reputation write cache scheduled nodes to be written at a time offset by
the local nodeID. The idea was that no two repair workers would have the
same nodeID, so they would not tend to write to the same row at the same
time.

Instead, since all satellite processes share the same satellite ID
(duh), this caused _all_ workers to try and write to the same row at the
same time _always_. This was not ideal.

This change uses a random number instead of the satellite ID. The random
number is sourced from the number of nanoseconds since the Unix epoch.
As long as workers are not started at the exact same nanosecond, they
ought to get well-distributed offsets.

Change-Id: I149bdaa6ca1ee6043cfedcf1489dd9d3e3c7a163
2022-08-03 21:14:06 +00:00
..
audithistory_test.go satellite/reputation: new ApplyUpdates() method 2022-06-07 15:22:25 +00:00
audithistory.go satellite/reputation: new ApplyUpdates() method 2022-06-07 15:22:25 +00:00
benchmark_test.go satellite/reputation: move Config fields into a Config struct 2022-05-24 20:57:51 +00:00
calculations.go satellite/reputation: new ApplyUpdates() method 2022-06-07 15:22:25 +00:00
config.go satellite/reputation: add a reputation write cache 2022-07-14 21:40:16 +00:00
db_test.go satellite/reputation: offset write times by random, not by satelliteID 2022-08-03 21:14:06 +00:00
service_test.go satellite/reputation: new ApplyUpdates() method 2022-06-07 15:22:25 +00:00
service.go satellite/reputation: add a reputation write cache 2022-07-14 21:40:16 +00:00
suspension_test.go satellite/reputation: move Config fields into a Config struct 2022-05-24 20:57:51 +00:00
writecache_service_test.go satellite/reputation: offset write times by random, not by satelliteID 2022-08-03 21:14:06 +00:00
writecache_unit_test.go satellite/reputation: offset write times by random, not by satelliteID 2022-08-03 21:14:06 +00:00
writecache.go satellite/reputation: offset write times by random, not by satelliteID 2022-08-03 21:14:06 +00:00