Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Clean up] deletion of the full MINC header entry from parameter_file as not used anymore #4925

Merged
merged 1 commit into from Jul 22, 2019

Conversation

cmadjar
Copy link
Collaborator

@cmadjar cmadjar commented Jul 4, 2019

Brief summary of changes

Until now, the whole header of a MINC file was dumped into a row of parameter_file, taking a lot of space in the database and the SQL dump created for that table, while not being used at all.

During the imaging meeting of July 4th, a decision has been made to no longer store that row to gain some space in the database, hence, removing it from the imaging pipeline code.

This is linked to aces/Loris-MRI#453 PR on the LORIS-MRI side.

Note: the API does not look specifically for that header but dumps all the values present in the parameter_file table so no changes were needed.

This resolves issue...

To test this change...

  • Make sure the SQL patch run correctly

@cmadjar cmadjar added Add to Release Notes PR change should be highlighted in Release notes (important security, features and bugfixes) Cleanup PR or issue introducing/requiring at least one clean-up operation SQL PR contains SQL modifications such as schema changes and new SQL scripts [branch] minor labels Jul 4, 2019
@cmadjar
Copy link
Collaborator Author

cmadjar commented Jul 4, 2019

@ridz1208 I will need to update the RB documentation to remove the query to delete that header field when creating a RB dataset with new imaging data. Cannot do it now since 21.0 was not merged into minor...

jesscall
jesscall previously approved these changes Jul 5, 2019
@jesscall jesscall added the Passed Manual Tests PR has undergone proper testing by at least one peer label Jul 5, 2019
@driusan
Copy link
Collaborator

driusan commented Jul 17, 2019

This seems like a pretty major change to me since there might be users depending on that data being in the database.

@cmadjar
Copy link
Collaborator Author

cmadjar commented Jul 17, 2019

It feels like we are going in circle with this one. Didn't we say that this specific header was completely useless and not queryable anyway at the last imaging meeting and that we should remove it to save some space in the parameter_file table?

@driusan
Copy link
Collaborator

driusan commented Jul 17, 2019

Yes, we did. I just mean in terms of which branch it should go to.

@driusan
Copy link
Collaborator

driusan commented Jul 17, 2019

(and I don't think we said it was completely useless, I'm pretty sure it's been used for various cron jobs in ibis over the years, it's just not nearly as useful as its cost..)

@cmadjar
Copy link
Collaborator Author

cmadjar commented Jul 17, 2019

OK. I doubt this is so much of a big change though but if you prefer moving it to major, no big deal. Can do that. Just let me know.

…rows that are useless and change the type of Value back to text
@cmadjar cmadjar force-pushed the remove_header_row_from_parameter_file branch from 8ecc3e0 to 5d04e88 Compare July 18, 2019 16:41
@cmadjar cmadjar changed the base branch from minor to major July 18, 2019 16:41
@cmadjar
Copy link
Collaborator Author

cmadjar commented Jul 18, 2019

@jesscall I had to rebase the branch to major and it dismissed your review. Would you mind reviewing it again? Thanks!!

@@ -0,0 +1,3 @@
DELETE FROM parameter_file WHERE ParameterTypeID=(SELECT ParameterTypeID FROM parameter_type WHERE Name='header' AND SourceFrom='parameter_file');
DELETE FROM parameter_type WHERE Name='header' AND SourceFrom='parameter_file';
ALTER TABLE parameter_file MODIFY Value TEXT;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmadjar I don't know the kind of value that are there but any value longer that 64KB will be trunct to the 1st 64KB.

If there should not be any value longer than that after the delete, I approve this PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PapillonMcGill the insertion script is filtering any value longer than 1000 characters so moving it back to text is fine. The only exception was the 'header' which was crazy long and that we are getting rid of in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification.

@driusan driusan merged commit e0e0375 into aces:major Jul 22, 2019
@cmadjar cmadjar deleted the remove_header_row_from_parameter_file branch July 22, 2019 15:09
@ridz1208 ridz1208 added this to the 22.0.0 milestone Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add to Release Notes PR change should be highlighted in Release notes (important security, features and bugfixes) Cleanup PR or issue introducing/requiring at least one clean-up operation Passed Manual Tests PR has undergone proper testing by at least one peer SQL PR contains SQL modifications such as schema changes and new SQL scripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants