nasa / cFE

The Core Flight System (cFS) Core Flight Executive (cFE)
Apache License 2.0
402 stars 198 forks source link

Use proper resource identifers for table validation and dump state structs #2550

Closed jphickey closed 1 week ago

jphickey commented 2 months ago

Is your feature request related to a problem? Please describe. Internally, table services keeps the state of a validation request and dump request in a separate structure under its global data. This is then referenced by index from the other areas (such as registry, etc).

This presents a possible race condition/stale data problem when indices are reused (they are treated as a ring buffer). That is, a reference to index "0" cannot be distinguished from a currently-valid index 0 or a previous reference that has since been closed and reopened for a different purpose.

Describe the solution you'd like Use Resource IDs. These have two major benefits to the robustness of the code:

Describe alternatives you've considered N/A

Additional context Gradually all table services indices should be converted to use resource IDs. However, changing the table handle will change the API, so that isn't being proposed yet.

These two items (validation and dump state) are rather simple and low-risk to change, as they aren't referenced in nearly as many places as the registry or handle/access descriptor table.

Requester Info Joseph Hickey, Vantage Systems, Inc.