----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73706/#review223746 -----------------------------------------------------------
Ship it! Ship It! - Pradeep Agrawal On Nov. 16, 2021, 1:39 p.m., Dineshkumar Yadav wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/73706/ > ----------------------------------------------------------- > > (Updated Nov. 16, 2021, 1:39 p.m.) > > > Review request for ranger, Ankita Sinha, Jayendra Parab, Kishor > Gollapalliwar, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep > Agrawal, Ramesh Mani, Vishal Suvagia, and Velmurugan Periasamy. > > > Bugs: RANGER-3504 > https://issues.apache.org/jira/browse/RANGER-3504 > > > Repository: ranger > > > Description > ------- > > Problem Statement > Currently we have two sets of patches in Ranger (DB & Java patches). > During Ranger setup, DB patches get executed first then Java patches get > executed in an orderly manner based on their sequence. > We don't have any mechanism where we can execute Java Patch first and it's > dependent DB patch afterwards. > > Please find the below approach to handle such scenarios. > Approach: > While executing DB patches, first check if any pre java patches are present > by name starting with PatchPreSql_<DB_version>. > If a Pre Java patch is found then execute that java patch first. > Execute DB patch. > Check again if there are any post java patches present by name starting with > PatchPostSql_<DB_version>. > If Post Java patches are found, execute them. > While naming the dependent Java patches we need to follow the below > convention. > Currently we follow convention: Patch<custom_name>_J<5 digit sequence > number>.java > Proposed naming convention for dependent Java Patch. Patch<Post or > Pre>Sql_<dependent DB patch version number>_<custom_name>_J<5 digit sequence > number>.java > Use Case: > Suppose we have a DB patch (050-uniqueindex.sql) and there are two Java > patches one needs to execute before and another immediately after DB patch. > In that scenario we should use the following convention for naming java > patches. > Pre Java Patch : PatchPreSql_050_CleanData_J10050.java > Post Java Patch : PatchPostSql_050_UpdateData_J10051.java > > > Diffs > ----- > > security-admin/scripts/db_setup.py 29f074326 > > > Diff: https://reviews.apache.org/r/73706/diff/2/ > > > Testing > ------- > > Tested in local setup for dependent pre and post java patch. > > > Thanks, > > Dineshkumar Yadav > >