magma / domain-proxy

A Domain proxy for Magma
BSD 3-Clause "New" or "Revised" License
1 stars 6 forks source link

Remove unused grants from database #501

Closed xbend closed 2 years ago

xbend commented 2 years ago

The purpose of this task is to have all IDLE grants removed from the database (via migration) and modify Configuration Controller to no longer store IDLE grants, but remove them during processing.

  1. Make migration that in upgrade will do:

    DELETE FROM grants WHERE state_id = (SELECT id from grant_states where name = 'idle')
  2. Modify Configuration Controller response processor strategy (grants are updated in multiple response handlers, please look for all references to IDLE grants) - whenever a grant is to be set as IDLE, remove it from the DB instead.