Blackrock add block validation#1740
Conversation
Co-authored-by: Zach McKenzie <92116279+zm711@users.noreply.github.com>
zm711
left a comment
There was a problem hiding this comment.
Good by me. I'll wait to see if @samuelgarcia or @alejoe91 want to take a quick look too.
cboulay
left a comment
There was a problem hiding this comment.
I've never used the header_flag so I can't speak to its validity or utility here. The rest of the changes are intended to simply be for readability but a couple of errors were introduced. Please see the inline comments and revise.
cboulay
left a comment
There was a problem hiding this comment.
Concerns addressed. Thanks.
zm711
left a comment
There was a problem hiding this comment.
I will still give Sam a chance to read this next week. At least at the maintenance meeting we can briefly discuss before merge.
|
Just to recap. Sam at the maintenance meeting said that he would prefer to ensure all file variants are handled since this PR would be at a release boundary. So we will confirm the header flag for other versions and incorporate that (or since this is put off we can discuss merging later this week--as long as we have a plan for the other variants). |
This request does not make sense. I just check and the other variant is empty: No validation can be performed there. |
|
Okay so that means everything is actually covered? I think the issue was that no one had worked on this recently enough to know if we needed to cover the other variants. |
Yes, my review indicates that everything that needs to be covered is covered. |
zm711
left a comment
There was a problem hiding this comment.
@samuelgarcia I'll leave the merge to you. But if the other variants don't matter this should be ready finally.
|
So for the delay. |
This is a PR I made when working together @luiztauffer to figure out how to open a malformed file. According to the blackrock spec heach data block has a flag indicating the start of the data block:
This PR adds a check and provides detailed debugging information including file offset, block index, expected vs actual values, and corruption indicators.
I also improved the missing file error message which now specifically list which NSX files are missing and did other minor improvements like using f-string formatting for filename
construction, clearer variable naming (replacing ambiguous spec with spec_version and
dh with packet_header), etc.