nasa / bplib

Apache License 2.0
27 stars 13 forks source link

Order of operations with custody ACK and storage acceptance #117

Closed jphickey closed 2 years ago

jphickey commented 2 years ago

In the current implementation, the persistent storage service (file offload) is invoked last after all of the custody operations have taken place. Specifically, the order of operations ends up as:

Notably, this means the ACK is generated (step 2) before the bundle is actually stored (step 4) meaning there is a window of opportunity for an acknowledgement to be sent but the bundle not actually stored.

However it was done this way for a reason, such that the bundle is stored with the correct custody tracking block - thus when forwarded it will already have the correct custody info, without needed an update for every (re)transmit.

To make this correct, the process needs to be adjusted: