From 3893d889f657aa615f048342d408e5a0d04af27f Mon Sep 17 00:00:00 2001 From: Varik Matevosyan Date: Sat, 29 Jun 2024 18:03:30 +0400 Subject: [PATCH] do not create replication slot, and dont pass recovery lsn for standby databases --- model/lantern/lantern_server.rb | 3 ++- model/strand.rb | 2 +- spec/model/lantern/lantern_server_spec.rb | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/model/lantern/lantern_server.rb b/model/lantern/lantern_server.rb index f1475de8d..12f7ca8a7 100644 --- a/model/lantern/lantern_server.rb +++ b/model/lantern/lantern_server.rb @@ -103,8 +103,9 @@ def configure_hash postgresql_recovery_target_lsn = resource.recovery_target_lsn || "" if standby? + backup_label = "LATEST" postgresql_recovery_target_time = "" - postgresql_recovery_target_lsn = resource.create_physical_replication_slot(ubid) + postgresql_recovery_target_lsn = "" end JSON.generate({ diff --git a/model/strand.rb b/model/strand.rb index 4ddad34e9..f825abdc5 100644 --- a/model/strand.rb +++ b/model/strand.rb @@ -8,7 +8,7 @@ class Strand < Sequel::Model Strand.plugin :defaults_setter, cache: true Strand.default_values[:stack] = proc { [{}] } - LEASE_EXPIRATION = 120 + LEASE_EXPIRATION = 240 many_to_one :parent, key: :parent_id, class: self one_to_many :children, key: :parent_id, class: self one_to_many :semaphores diff --git a/spec/model/lantern/lantern_server_spec.rb b/spec/model/lantern/lantern_server_spec.rb index 822e0e4d3..82f7b7a58 100644 --- a/spec/model/lantern/lantern_server_spec.rb +++ b/spec/model/lantern/lantern_server_spec.rb @@ -488,7 +488,6 @@ expect(lantern_server).to receive(:lantern_version).and_return("0.2.2").at_least(:once) expect(lantern_server).to receive(:extras_version).and_return("0.1.4").at_least(:once) expect(lantern_server).to receive(:minor_version).and_return("1").at_least(:once) - expect(lantern_server.resource).to receive(:create_physical_replication_slot).and_return("0/6002748") expect(vm).to receive(:boot_image).and_return("custom-image").at_least(:once) walg_conf = timeline.generate_walg_config @@ -518,7 +517,7 @@ container_image: "#{Config.gcr_image}:lantern-#{lantern_server.lantern_version}-extras-#{lantern_server.extras_version}-minor-#{lantern_server.minor_version}", postgresql_recover_from_backup: "LATEST", postgresql_recovery_target_time: "", - postgresql_recovery_target_lsn: "0/6002748", + postgresql_recovery_target_lsn: "", gcp_creds_walg_b64: walg_conf[:gcp_creds_b64], walg_gs_prefix: walg_conf[:walg_gs_prefix], gcp_creds_big_query_b64: resource.gcp_creds_b64,