storj/satellite/reputation
Yingrong Zhao 1f8f7ebf06 satellite/{audit, reputation}: fix potential nodes reputation status
inconsistency

The original design had a flaw which can potentially cause discrepancy
for nodes reputation status between reputations table and nodes table.
In the event of a failure(network issue, db failure, satellite failure, etc.)
happens between update to reputations table and update to nodes table, data
can be out of sync.
This PR tries to fix above issue by passing through node's reputation from
the beginning of an audit/repair(this data is from nodes table) to the next
update in reputation service. If the updated reputation status from the service
is different from the existing node status, the service will try to update nodes
table. In the case of a failure, the service will be able to try update nodes
table again since it can see the discrepancy of the data. This will allow
both tables to be in-sync eventually.

Change-Id: Ic22130b4503a594b7177237b18f7e68305c2f122
2022-01-06 21:05:59 +00:00
..
audithistory_test.go satellite/satellitedb: improve Update query for reputation 2021-08-10 13:06:13 +00:00
audithistory.go satellite/satellitedb/reputation: replace audit_histories table with 2021-07-28 19:21:16 -04:00
benchmark_test.go satellite/{audit, reputation}: fix potential nodes reputation status 2022-01-06 21:05:59 +00:00
config.go satellite/reputation: return default reputation stats when node is not 2021-08-04 19:34:54 +00:00
db_test.go satellite/{audit, reputation}: fix potential nodes reputation status 2022-01-06 21:05:59 +00:00
service_test.go satellite/{audit, reputation}: fix potential nodes reputation status 2022-01-06 21:05:59 +00:00
service.go satellite/{audit, reputation}: fix potential nodes reputation status 2022-01-06 21:05:59 +00:00
suspension_test.go satellite/{audit, reputation}: fix potential nodes reputation status 2022-01-06 21:05:59 +00:00