Skip to content

Commit 5c36269

Browse files
committed
ETT-813: mitigate 'server has gone away'
We were getting a database connection, doing a potentially expensive checksum computation, then re-using that connection. This fixes the order so the connection doesn't idle out. We shouldn't need to do this checksum calculation, but fixing that isn't in scope here; see ETT-820.
1 parent 6aa71ba commit 5c36269

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/HTFeed/Storage/PrefixedVersions.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ sub record_backup {
9696

9797
my $start_time = $self->{job_metrics}->time;
9898
get_logger->trace("recording backup for $self");
99-
my $dbh = HTFeed::DBTools::get_dbh();
10099

101100
my $saved_checksum = HTFeed::VolumeValidator::md5sum($self->zip_obj_path());
102101

102+
my $dbh = HTFeed::DBTools::get_dbh();
103103
my $stmt =
104104
"insert into feed_backups (namespace, id, path, version, storage_name,
105105
zip_size, mets_size, saved_md5sum, lastchecked, lastmd5check, md5check_ok)

0 commit comments

Comments
 (0)