storj/satellite/satellitedb
paul cannon 0e2fef977f satellite/overlay: add SetAllContainedNodes method to overlay.DB
We will be needing an infrequent chore to check which nodes are in the
reverify queue and synchronize that set with the 'contained' field in
the nodes db, since it is easily possible for them to get out of sync.
(We can't require that the reverification queue table be in the same
database as the nodes table, so maintaining consistency with SQL
transactions is out. Plus, even if they were in the same database, using
such SQL transactions to maintain consistency would be slow and
unwieldy.)

This commit adds a method to the overlay allowing the caller to set the
contained status of all nodes in the nodes table at once. This is valid
because our definition of "contained" now depends solely on whether a
node appears at least once in the reverification queue. Only rows whose
contained field does not match the expectation will be updated; the
contained timestamp will not be updated for a node which is supposed to
be contained and was already contained.

Change-Id: I8cabe56ad897b6027e11aa5b17175295391aa3ac
2023-02-06 10:18:54 +00:00
..
dbx satellite/satellitedb: create index for interval_day for project_bandwidth_daily_rollup 2023-02-03 10:02:58 +00:00
satellitedbtest private/testplanet: enable full table scan detection 2023-02-03 12:11:18 +00:00
testdata satellite/satellitedb: create index for interval_day for project_bandwidth_daily_rollup 2023-02-03 10:02:58 +00:00
accountfreezeevents_test.go satellite/{console,satellitedb}: add account freeze service 2022-12-16 22:24:58 +00:00
accountfreezeevents.go satellite/{console,satellitedb}: add account freeze service 2022-12-16 22:24:58 +00:00
apikeys.go satellite: remove rewards package 2023-01-31 11:46:50 +00:00
attribution.go satellite: remove rewards package 2023-01-31 11:46:50 +00:00
audithistory.go satellite/reputation: new ApplyUpdates() method 2022-06-07 15:22:25 +00:00
billingdb.go satellite/payments/monetary: remove pkg and all its references 2022-09-07 12:58:00 +00:00
bucketsdb.go satellite/accounting/tally: fix looping over all buckets 2022-12-07 10:32:23 +00:00
coinpaymentstxs.go satellite: remove unused coinpayments code and chores 2022-11-30 16:24:48 +00:00
compensation.go satellite/compensation: smaller txns for RecordPeriod 2021-03-02 20:14:25 +00:00
consoledb_test.go satellite/satellitedb/satellitedbtest: pass ctx as an argument 2020-01-20 16:35:42 +02:00
consoledb.go satellite/{console,satellitedb}: implement account freeze event DB 2022-12-15 14:16:24 +00:00
containment.go satellite/audit: add GetAllContainedNodes method to ReverifyQueue 2023-02-02 00:39:29 +00:00
customers.go satellite/billing: make stripe invoice generation work with multiregion satellites 2021-05-06 11:51:03 -06:00
database.go satellite/audit: newContainment->containment 2022-12-16 17:59:52 +00:00
gracefulexit.go sql: capitalize keywords 2022-03-01 15:19:38 +00:00
invoiceprojectrecords.go satellite/satellitedb: use tx instead of db.db in transactions 2022-06-14 17:35:44 +00:00
migrate_gen.go all: fix deprecated ioutil commands 2022-10-11 15:27:29 +00:00
migrate_test.go satellite/satellitedb: remove references to last_verification_reminder 2023-01-05 08:58:05 -07:00
migrate.go satellite/satellitedb: create index for interval_day for project_bandwidth_daily_rollup 2023-02-03 10:02:58 +00:00
migratez.go satellite/satellitedb: create index for interval_day for project_bandwidth_daily_rollup 2023-02-03 10:02:58 +00:00
nodeapiversion.go ci: fix lint errors 2021-05-17 13:37:31 +00:00
nodeevents_test.go satellite/nodeevents: take last_attempted into account when selecting 2022-12-01 20:08:38 +00:00
nodeevents.go satellite/nodeevents: take last_attempted into account when selecting 2022-12-01 20:08:38 +00:00
nodeselection.go satellite/overlay: return noise info with selected nodes 2023-02-02 15:46:27 +00:00
orders_test.go satellite/orders: fix sorting rollups before inserting 2023-02-01 12:17:25 +00:00
orders.go satellite/orders: fix sorting rollups before inserting 2023-02-01 12:17:25 +00:00
overlaycache_test.go satellite/overlay: add SetAllContainedNodes method to overlay.DB 2023-02-06 10:18:54 +00:00
overlaycache.go satellite/overlay: add SetAllContainedNodes method to overlay.DB 2023-02-06 10:18:54 +00:00
payouts.go satellite/compensation: smaller txns for RecordPeriod 2021-03-02 20:14:25 +00:00
peeridentities.go all: fix dots 2020-07-16 14:58:28 +00:00
projectaccounting_test.go satellite/payments/stripecoinpayments: make price overrides per-bucket 2023-02-01 23:17:25 +00:00
projectaccounting.go satellite/payments/stripecoinpayments: make price overrides per-bucket 2023-02-01 23:17:25 +00:00
projectfromdbx_test.go satellite/{console,satellitedb}: add PublicID to Project, db method GetByPublicID 2022-07-21 19:49:26 +00:00
projectmembers_test.go web/satellite: project members sorting fixed (#3231) 2019-10-15 15:24:53 +03:00
projectmembers.go all: fix linter complaints 2020-10-13 15:59:01 +03:00
projects_test.go satellite/{console,satellitedb}: add account freeze service 2022-12-16 22:24:58 +00:00
projects.go satellite: remove rewards package 2023-01-31 11:46:50 +00:00
regtokens.go all: fix dots 2020-07-16 14:58:28 +00:00
repairqueue.go satellite/repair: implementation of batch insert 2022-05-09 12:41:22 +00:00
reputations.go satellite/reputation: reconfigure lambda and alpha 2022-08-17 18:52:53 +00:00
resetpasstokens.go all: fix dots 2020-07-16 14:58:28 +00:00
reverifyqueue_test.go satellite/audit: add GetAllContainedNodes method to ReverifyQueue 2023-02-02 00:39:29 +00:00
reverifyqueue.go satellite/audit: add GetAllContainedNodes method to ReverifyQueue 2023-02-02 00:39:29 +00:00
revocation.go sql: capitalize keywords 2022-03-01 15:19:38 +00:00
storagenodeaccounting.go satellite/accounting/nodetally: add ranged loop 2023-01-17 13:50:18 +01:00
storjscanpayments.go satellite/payments/monetary: remove pkg and all its references 2022-09-07 12:58:00 +00:00
storjscanwallets.go satellitedb: add token balance to API endpoint 2022-08-31 22:55:16 +00:00
stripecoinpaymentsdb.go satellite/{payments,satellitedb}: Remove custom coupon implementation 2021-10-11 19:47:00 +00:00
userfromdbx_test.go satellite/console: add cutoff to email reminders 2022-06-09 16:45:35 +00:00
users_test.go satellite/satellitedb: remove references to last_verification_reminder 2023-01-05 08:58:05 -07:00
users.go satellite: remove rewards package 2023-01-31 11:46:50 +00:00
verifyqueue_test.go satellite/audit: help performance of pushing to audit queue 2022-11-29 15:37:49 +00:00
verifyqueue.go satellite/audit: help performance of pushing to audit queue 2022-11-29 15:37:49 +00:00
webappsessions_test.go satellite/console: implement WebappSessions db 2022-05-16 15:06:04 +00:00
webappsessions.go satellite/console,web/satellite: invalidate sessions after inactivity 2022-08-23 15:51:05 +00:00