Commit f2187349 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Bug fix to icky problem reported by Kevin; after a failed swapmod the

NS file is wrong. Well, worse then that, the query was wrong and it
was setting all the resource records for that experiment to the new NS
file. Highly annoying, probably no way to recover the lost record of
NS files.
parent 6ba4e6a3
...@@ -731,7 +731,8 @@ sub AddInputFile($$;$) ...@@ -731,7 +731,8 @@ sub AddInputFile($$;$)
} }
if ($isnsfile && if ($isnsfile &&
$self->TableUpdate("experiment_resources", $self->TableUpdate("experiment_resources",
"input_data_idx='$input_data_idx'") != 0) { "input_data_idx='$input_data_idx'",
"rsrcidx='$rsrcidx'")) != 0) {
DBQueryWarn("unlock tables"); DBQueryWarn("unlock tables");
return -1; return -1;
} }
...@@ -2154,6 +2155,7 @@ sub PostSwap($$$$) ...@@ -2154,6 +2155,7 @@ sub PostSwap($$$$)
else { else {
$swapper->UpdateStats($which, 0, 0, 0); $swapper->UpdateStats($which, 0, 0, 0);
} }
# #
# Update the per-experiment record. # Update the per-experiment record.
...@@ -3266,6 +3268,5 @@ sub VnameToPmap($$) ...@@ -3266,6 +3268,5 @@ sub VnameToPmap($$)
return Node->Lookup($node_id); return Node->Lookup($node_id);
} }
# _Always_ make sure that this 1 is at the end of the file... # _Always_ make sure that this 1 is at the end of the file...
1; 1;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment