Skip to content

Commit

Permalink
do not create replication slot, and dont pass recovery lsn for standb…
Browse files Browse the repository at this point in the history
…y databases
  • Loading branch information
var77 committed Jun 29, 2024
1 parent 878a66d commit 3893d88
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion model/lantern/lantern_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion model/strand.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions spec/model/lantern/lantern_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 3893d88

Please sign in to comment.