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

Move user lookup to after tables are unlocked.

parent da45fee0
......@@ -393,12 +393,6 @@ my $idleswaptime = $experiment->idleswap_timeout() / 60.0;
my $autoswaptime = $experiment->autoswap_timeout() / 60.0;
my $rendering = $experiment->prerender_pid();
# Need the previous swapper for rollback below.
my $last_swapper = User->Lookup($experiment->swapper_idx());
if (! defined($last_swapper)) {
tbdie("Error looking up object for last swapper!");
}
if ($inout ne "out") {
# I'm going to update this below, so fix the value before I use it.
$idleswap_time = min($idleswaptime * 60, $idleswap_time);
......@@ -725,6 +719,12 @@ $justexit = 0;
$experiment->UnLockTables();
# Need the previous swapper for rollback below. Safe now that tables unlocked.
my $last_swapper = User->Lookup($experiment->swapper_idx());
if (! defined($last_swapper)) {
tbdie("Error looking up object for last swapper!");
}
#
# XXX - At this point a failure is going to leave things in an
# inconsistent state. Be sure to call fatal() only since we are
......
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