threefoldtech / tfgrid-sdk-go

Apache License 2.0
2 stars 4 forks source link

add generated columns for node table #593

Open Omarabdul3ziz opened 10 months ago

Omarabdul3ziz commented 10 months ago

currently, we decide the node status on the server level at pkg/nodestatus and this code is used multiple times on converters and filters. it looks we can do that on the database level using generated colomn it will be cleaner.

also, this can be done for the dedicated field on node.

https://github.com/threefoldtech/tfgrid-sdk-go/blob/6f41e0b83f61fb41e7a153d1579416d88f89b559/grid-proxy/internal/explorer/converters.go#L61-L62

Omarabdul3ziz commented 10 months ago

if we gonna do this, it needs to be on the cache tables away from the processor db tables to not introduce a possibility of errors because two owners modifying the same table