Blob Download and Conversion (SIRI-1022) #2068
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When converting "virtual" blob information into physical keys, the framework generally distinguishes between blocking and non-blocking operation. In the former case, if a variant does not exist yet, the node is required to have conversion enabled as an exception would be thrown else. In the latter case of non-blocking operation, even on nodes with conversion enabled, no conversion would be attempted. This requires the invoker to explicitly deal with the case when conversion is required.
Before, the
download
method simply used a blocking call, obviously assuming that it would return anull
object in case conversion is disabled. This assumption is wrong. We need to make sure that the current node has conversion enabled before invoking a blocking call. For nodes without conversion, we need to delegate immediately.Note that there are several possible ways to implement this. We could also immediately check for whether conversion is enabled and directly resolve the physical key in a blocking manner. However, I personally consider the code as suggested more flexible, as it would allow to attempt to delegate even on a node with conversion if that conversion has failed gracefully for any reason.
Additional Notes
Checklist