Commit 720bb591 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Minor fixes to how I handle case where there is a last resource record

pointer. This indicates a previous failure that really got hosed and
left the reources table and/or stats table in a bad state which must
be fixed by hand (for now).
parent d50bb038
......@@ -55,6 +55,7 @@ $EXPT_SWAPMOD = TBDB_STATS_SWAPMODIFY();
# For stats gathering code.
my $EXPT_STARTCLOCK;
my $EXPT_RESOURCESHOSED = 0;
# Why, why, why?
@EXPORT_OK = qw($EXPT_PRELOAD $EXPT_START
......@@ -1203,6 +1204,8 @@ sub PreSwap($$$)
#
if ($self->lastrsrc()) {
print STDERR "Inconsistent lastrsrc in stats record for $self!\n";
# XXX
$EXPT_RESOURCESHOSED = 1;
return -1;
}
......@@ -1301,6 +1304,10 @@ sub SwapFail($$$$)
return -1
if (! ref($self));
# Do not proceed if we got here via a hosed resources record.
return 0
if ($EXPT_RESOURCESHOSED);
# Old swap gathering stuff.
$self->GatherSwapStats($swapper, $which, $ecode);
......
Markdown is supported
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