Changeset 30545
- Timestamp:
- Feb 9, 2011, 11:40:59 AM (15 years ago)
- Location:
- tags/ipp-20101215/ippTools
- Files:
-
- 9 edited
-
share/difftool_pendingcleanupskyfile.sql (modified) (1 diff, 1 prop)
-
share/difftool_setskyfiletoupdate.sql (modified) (1 diff, 1 prop)
-
share/magicdstool_setfiletoupdate.sql (modified) (1 diff, 1 prop)
-
share/warptool_setskyfiletoupdate.sql (modified) (1 diff, 1 prop)
-
src/chiptool.c (modified) (3 diffs, 1 prop)
-
src/difftool.c (modified) (3 diffs, 1 prop)
-
src/magicdstool.c (modified) (4 diffs, 1 prop)
-
src/pxtools.h (modified) (1 diff, 1 prop)
-
src/warptool.c (modified) (6 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20101215/ippTools/share/difftool_pendingcleanupskyfile.sql
- Property svn:mergeinfo set to
r24186 r30545 9 9 USING(diff_id) 10 10 WHERE 11 ((diffRun.state = 'goto_cleaned' AND diffSkyfile.data_state = 'full')11 ((diffRun.state = 'goto_cleaned' AND (diffSkyfile.data_state = 'full' OR diffSkyfile.data_state = 'update')) 12 12 OR 13 13 (diffRun.state = 'goto_scrubbed' AND diffSkyfile.data_state != 'scrubbed') -
tags/ipp-20101215/ippTools/share/difftool_setskyfiletoupdate.sql
- Property svn:mergeinfo set to
r29568 r30545 1 1 UPDATE diffRun 2 2 JOIN diffSkyfile USING(diff_id) 3 LEFT JOIN magicDSRun ON (stage_id = diff_id AND stage = 'diff')4 LEFT JOIN magicDSFile ON (magicDSRun.magic_ds_id = magicDSFile.magic_ds_id5 AND component = skycell_id)6 3 SET diffRun.state = 'update', 7 diffSkyfile.data_state = 'update' 4 diffSkyfile.data_state = 'update', 5 diffSkyfile.fault = 0 8 6 -- set hook %s 9 7 WHERE diff_id = %lld 10 8 AND (diffRun.state = 'cleaned' OR diffRun.state = 'update') 11 AND (diffSkyfile.data_state = 'cleaned' )9 AND (diffSkyfile.data_state = 'cleaned' AND diffSkyfile.data_state = 'update') -
tags/ipp-20101215/ippTools/share/magicdstool_setfiletoupdate.sql
- Property svn:mergeinfo set to
r29561 r30545 7 7 WHERE magic_ds_id = %lld 8 8 AND (magicDSRun.state = 'cleaned' OR magicDSRun.state = 'update') 9 AND (magicDSFile.data_state = 'cleaned' )9 AND (magicDSFile.data_state = 'cleaned' OR magicDSFile.data_state ='update') -
tags/ipp-20101215/ippTools/share/warptool_setskyfiletoupdate.sql
- Property svn:mergeinfo set to
r29568 r30545 1 1 UPDATE warpRun 2 2 JOIN warpSkyfile USING(warp_id) 3 LEFT JOIN magicDSRun ON (stage_id = warp_id AND stage = 'warp')4 LEFT JOIN magicDSFile ON (magicDSRun.magic_ds_id = magicDSFile.magic_ds_id5 AND component = skycell_id)6 3 SET warpRun.state = 'update', 7 warpSkyfile.data_state = 'update' 4 warpSkyfile.data_state = 'update', 5 warpSkyfile.fault = 0 8 6 -- set hook %s 9 7 WHERE warp_id = %lld 10 8 AND (warpRun.state = 'cleaned' OR warpRun.state = 'update') 11 AND (warpSkyfile.data_state = 'cleaned' )9 AND (warpSkyfile.data_state = 'cleaned' OR warpSkyfile.data_state = 'update') -
tags/ipp-20101215/ippTools/src/chiptool.c
- Property svn:mergeinfo set to
r30049 r30545 838 838 PXOPT_COPY_S16(config->args, where, "-fault", "chipProcessedImfile.fault", "=="); 839 839 840 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 841 840 842 if (!psListLength(where->list) 841 843 && !psMetadataLookupBool(NULL, config->args, "-all")) { … … 874 876 } 875 877 psFree(query); 878 879 if (!fault) { 880 // If fault has not been supplied, don't revert update faults with the magic value 881 // We don't do this for new runs because then they would never complete 882 // quality should be used to drop bad components 883 psStringAppend(&query_update, " AND (chipProcessedImfile.fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT); 884 } 876 885 if (!p_psDBRunQuery(config->dbh, query_update)) { 877 886 psError(PS_ERR_UNKNOWN, false, "database error"); … … 1919 1928 } 1920 1929 1930 // we do not update components with the magic fault value. They are non-updateable 1931 psStringAppend(&query, " AND (chipProcessedImfile.fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT); 1932 1921 1933 if (!p_psDBRunQueryF(config->dbh, query, setHook, chip_id)) { 1922 1934 psError(PS_ERR_UNKNOWN, false, "database error"); -
tags/ipp-20101215/ippTools/src/difftool.c
- Property svn:mergeinfo set to
r30536 r30545 917 917 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 918 918 919 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 920 919 921 if (!psListLength(where->list) && !psMetadataLookupBool(NULL, config->args, "-all")) { 920 922 psFree(where); … … 950 952 psLogMsg("difftool", PS_LOG_INFO, "Deleted %" PRIu64 " rows", psDBAffectedRows(config->dbh)); 951 953 954 if (!fault) { 955 // If fault has not been supplied, don't revert update faults with the magic value 956 // We don't do this for new runs because then they would never complete 957 // quality should be used to drop bad components 958 psStringAppend(&query_updated, " AND (diffSkyfile.fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT); 959 } 952 960 if (!p_psDBRunQuery(config->dbh, query_updated)) { 953 961 psError(PS_ERR_UNKNOWN, false, "database error"); … … 3201 3209 psStringAppend(&query, " AND (diffSkyfile.skycell_id = '%s')", skycell_id); 3202 3210 } 3211 // we do not update components with the magic fault value. They are non-updateable 3212 // (But can be recovered with "difftool -revertwarped -fault 26" (PXTOOL_DO_NOT_REVERT_FAULT) 3213 psStringAppend(&query, " AND (diffSkyfile.fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT); 3203 3214 3204 3215 if (!p_psDBRunQueryF(config->dbh, query, setHook, diff_id)) { -
tags/ipp-20101215/ippTools/src/magicdstool.c
- Property svn:mergeinfo changed
/trunk/ippTools/src/magicdstool.c merged: 30544
r30321 r30545 1112 1112 1113 1113 PXOPT_LOOKUP_STR(state, config->args, "-state", false, false); 1114 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 1114 1115 1115 1116 psString queryFile = NULL; 1117 bool stateIsUpdate = false; 1116 1118 if (state) { 1117 1119 if (! strcmp(state, "new") || !strcmp(state, "goto_restored")) { … … 1119 1121 } else if (!strcmp(state, "update")) { 1120 1122 queryFile = "magicdstool_revertupdated.sql"; 1123 stateIsUpdate = true; 1121 1124 } else { 1122 1125 psError(PXTOOLS_ERR_SYS, true, "%s is not a valid value for state", state); … … 1141 1144 } 1142 1145 psFree(where); 1146 1147 if (stateIsUpdate && !fault) { 1148 // If fault has not been supplied, don't revert update faults with 1149 // the magic "do not update" value 1150 // We don't do this for new runs because then they would never complete 1151 // quality should be used to drop bad components 1152 psStringAppend(&query, " AND magicDSFile.fault != %d", PXTOOL_DO_NOT_REVERT_FAULT); 1153 } 1143 1154 1144 1155 if (!p_psDBRunQuery(config->dbh, query)) { … … 1744 1755 } 1745 1756 1757 // we do not update components with the magic fault value. They are non-updateable 1758 // (But can be recovered with "magicdstool -revertdestreakedfile -fault 26" (PXTOOL_DO_NOT_REVERT_FAULT) 1759 psStringAppend(&query, " AND (fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT); 1760 1746 1761 if (!p_psDBRunQueryF(config->dbh, query, setHook, magic_ds_id)) { 1747 1762 psError(PS_ERR_UNKNOWN, false, "database error"); - Property svn:mergeinfo changed
-
tags/ipp-20101215/ippTools/src/pxtools.h
- Property svn:mergeinfo set to
r28486 r30545 51 51 # define MAX_ROWS 10e9 52 52 # define PXTOOL_MODE_NONE 0x0 53 // we do not revert or update components with this fault value 54 // This is the same value as PSTAMP_GONE 55 # define PXTOOL_DO_NOT_REVERT_FAULT 26 53 56 54 57 bool pxIsValidState(const char *state); -
tags/ipp-20101215/ippTools/src/warptool.c
- Property svn:mergeinfo set to
r29903 r30545 1485 1485 PXOPT_COPY_S16(config->args, where, "-fault", "warpSkyfile.fault", "=="); 1486 1486 1487 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 1488 1487 1489 if (!psListLength(where->list) 1488 1490 && !psMetadataLookupBool(NULL, config->args, "-all")) { … … 1510 1512 } 1511 1513 psFree(where); 1514 1515 if (!fault) { 1516 // If fault has not been supplied, don't revert update faults with the magic value 1517 // We don't do this for new runs because then they would never complete 1518 // quality should be used to drop bad components 1519 psStringAppend(&query_updated, " AND fault != %d", PXTOOL_DO_NOT_REVERT_FAULT); 1520 } 1512 1521 1513 1522 if (!p_psDBRunQuery(config->dbh, query)) { … … 2003 2012 // shared code for the modes -tocleanedskyfile -tofullskyfile -topurgedskyfile 2004 2013 2005 static bool change_skyfile_data_state(pxConfig *config, psString data_state , psString run_state)2014 static bool change_skyfile_data_state(pxConfig *config, psString data_state) 2006 2015 { 2007 2016 PS_ASSERT_PTR_NON_NULL(config, false); … … 2065 2074 static bool tocleanedskyfileMode(pxConfig *config) 2066 2075 { 2067 return change_skyfile_data_state(config, "cleaned" , "goto_cleaned");2076 return change_skyfile_data_state(config, "cleaned"); 2068 2077 } 2069 2078 static bool tofullskyfileMode(pxConfig *config) 2070 2079 { 2071 return change_skyfile_data_state(config, "full" , "update");2080 return change_skyfile_data_state(config, "full"); 2072 2081 } 2073 2082 static bool topurgedskyfileMode(pxConfig *config) 2074 2083 { 2075 return change_skyfile_data_state(config, "purged" , "goto_purged");2084 return change_skyfile_data_state(config, "purged"); 2076 2085 } 2077 2086 static bool toscrubbedskyfileMode(pxConfig *config) 2078 2087 { 2079 return change_skyfile_data_state(config, "scrubbed" , "goto_scrubbed");2088 return change_skyfile_data_state(config, "scrubbed"); 2080 2089 } 2081 2090 … … 2101 2110 else { 2102 2111 if (strcmp(state,"error_cleaned") == 0) { 2103 change_skyfile_data_state(config,"error_cleaned" ,"goto_cleaned");2112 change_skyfile_data_state(config,"error_cleaned"); 2104 2113 } 2105 2114 else if (strcmp(state, "error_scrubbed") == 0) { 2106 change_skyfile_data_state(config,"error_scrubbed" ,"goto_scrubbed");2115 change_skyfile_data_state(config,"error_scrubbed"); 2107 2116 } 2108 2117 else if (strcmp(state, "error_purged") == 0) { 2109 change_skyfile_data_state(config,"error_purged" ,"goto_purged");2118 change_skyfile_data_state(config,"error_purged"); 2110 2119 } 2111 2120 else { … … 2526 2535 psStringAppend(&query, " AND (warpSkyfile.skycell_id = '%s')", skycell_id); 2527 2536 } 2537 // we do not update components with the magic fault value. They are non-updateable 2538 // (But can be recovered with "warptool -revertwarped -fault 26" (PXTOOL_DO_NOT_REVERT_FAULT) 2539 psStringAppend(&query, " AND (warpSkyfile.fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT); 2528 2540 2529 2541 if (!p_psDBRunQueryF(config->dbh, query, setHook, warp_id)) {
Note:
See TracChangeset
for help on using the changeset viewer.
