Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Cloud-Databases): RR & PITR Groups Attribute for Source Formations with Multiple Members #5862

Closed

Conversation

omaraibrahim
Copy link
Collaborator

@omaraibrahim omaraibrahim commented Dec 10, 2024

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Output from acceptance testing:

Description

Read Replicas and PITRs are not working for formations with multiple members.

This is because our codebase assumes that the source formation will always have the default members. In the fix, we will now get the members from the source formation.

Example of Successful Read Replica with 3 members

resource "ibm_database" "postgresql" {
  resource_group_id            = data.ibm_resource_group.test_acc.id
  name                         = "omar-psql-12-12-us-east-pg-rr"
  service                      = "databases-for-postgresql"
  plan                         = "standard"
  location                     = "us-east"
  service_endpoints            = "public"
  version = "15"
  remote_leader_id = "crn:v1:bluemix:public:databases-for-postgresql:us-east:a/40ddc34a953a8c02f10987b59085b60e:d70adc01-434b-4482-a403-a43fa658dfce::"
  group {
    group_id = "member"
    cpu {
      allocation_count = 3
    }
    disk {
      allocation_mb = 30720
    }
    host_flavor {
      id = "multitenant"
    }
    memory {
      allocation_mb = 7168
    }
  }
}
Screenshot 2024-12-12 at 2 44 46 PM

Example of Successful Read Replica with 2 members

resource "ibm_database" "postgresql" {
  resource_group_id            = data.ibm_resource_group.test_acc.id
  name                         = "omar-psql-12-12-us-east-pg-rr-2"
  service                      = "databases-for-postgresql"
  plan                         = "standard"
  location                     = "us-east"
  service_endpoints            = "public"
  version = "16"
  remote_leader_id = "crn:v1:bluemix:public:databases-for-postgresql:us-east:a/40ddc34a953a8c02f10987b59085b60e:490d8e84-18b4-43f1-80c5-cd206406672a::"
  group {
    group_id = "member"
    cpu {
      allocation_count = 3
    }
    disk {
      allocation_mb = 30720
    }
    host_flavor {
      id = "multitenant"
    }
    memory {
      allocation_mb = 7168
    }
  }
}
Screenshot 2024-12-12 at 3 16 57 PM

Example of Successful PITR with 3 members

resource "ibm_database" "postgresql" {
  resource_group_id            = data.ibm_resource_group.test_acc.id
  name                         = "omar-psql-12-10-us-east-pg-pitr"
  service                      = "databases-for-postgresql"
  plan                         = "standard"
  location                     = "us-east"
  service_endpoints            = "public"
  version = "15"
  point_in_time_recovery_deployment_id = "crn:v1:bluemix:public:databases-for-postgresql:us-east:a/40ddc34a953a8c02f10987b59085b60e:d70adc01-434b-4482-a403-a43fa658dfce::"
  point_in_time_recovery_time = "2024-12-09T21:24:02.000Z"
  group {
    group_id = "member"
    cpu {
      allocation_count = 3
    }
    disk {
      allocation_mb = 30720
    }
    host_flavor {
      id = "multitenant"
    }
    memory {
      allocation_mb = 7168
    }
  }
}
Screenshot 2024-12-12 at 3 53 02 PM

@omaraibrahim omaraibrahim changed the title fixed read replica issue fix(Cloud-Databases): Read Replica Groups Attribute for Horizontal Scaled Source Formations Dec 10, 2024
@omaraibrahim omaraibrahim changed the title fix(Cloud-Databases): Read Replica Groups Attribute for Horizontal Scaled Source Formations fix(Cloud-Databases): RR & PITR Groups Attribute is Fixed for Source Formations with Multiple Members Dec 10, 2024
@omaraibrahim omaraibrahim marked this pull request as ready for review December 10, 2024 19:59
@omaraibrahim omaraibrahim changed the title fix(Cloud-Databases): RR & PITR Groups Attribute is Fixed for Source Formations with Multiple Members fix(Cloud-Databases): RR & PITR Groups Attribute for Source Formations with Multiple Members Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant