From 5c3626915a0f3a997433dab3772596ed48181a80 Mon Sep 17 00:00:00 2001 From: Aaron Elkiss Date: Mon, 3 Nov 2025 12:00:50 -0500 Subject: [PATCH] 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. --- lib/HTFeed/Storage/PrefixedVersions.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/HTFeed/Storage/PrefixedVersions.pm b/lib/HTFeed/Storage/PrefixedVersions.pm index fbf8d926..220bc4d4 100644 --- a/lib/HTFeed/Storage/PrefixedVersions.pm +++ b/lib/HTFeed/Storage/PrefixedVersions.pm @@ -96,10 +96,10 @@ sub record_backup { my $start_time = $self->{job_metrics}->time; get_logger->trace("recording backup for $self"); - my $dbh = HTFeed::DBTools::get_dbh(); my $saved_checksum = HTFeed::VolumeValidator::md5sum($self->zip_obj_path()); + my $dbh = HTFeed::DBTools::get_dbh(); my $stmt = "insert into feed_backups (namespace, id, path, version, storage_name, zip_size, mets_size, saved_md5sum, lastchecked, lastmd5check, md5check_ok)