Skip to content

feat: Introduce 'smartStopDelay' for managing PG smart shutdown timeout - #2848

Merged
gbartolini merged 7 commits into
cloudnative-pg:mainfrom
EnterpriseDB:dev/cnp-4151
Sep 25, 2023
Merged

gbartolini merged 7 commits into
cloudnative-pg:mainfrom
EnterpriseDB:dev/cnp-4151

Conversation

@YanniHu1996

Copy link
Copy Markdown
Contributor

Closes: #2844

@github-actions github-actions Bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.19 labels Sep 22, 2023
@github-actions

Copy link
Copy Markdown
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@YanniHu1996 YanniHu1996 changed the title feat: Introduce 'smartStopDelayto' for managing PG smart shutdown timeout feat: Introduce 'smartStopDelay' for managing PG smart shutdown timeout Sep 22, 2023
@armru

armru commented Sep 22, 2023

Copy link
Copy Markdown
Member

/test limit=local

@github-actions

Copy link
Copy Markdown
Contributor

@gbartolini
gbartolini force-pushed the dev/cnp-4151 branch 2 times, most recently from 2e17719 to 464548b Compare September 22, 2023 12:59
@armru

armru commented Sep 22, 2023

Copy link
Copy Markdown
Member

Hello, @litaocdl @YanniHu1996. I think we have broken the E2E test because now we are waiting a long time before cutting the connections.

We should fix this issue by keeping the old behaviour in the tests by hard-coding 30 seconds in the fixtures

@litaocdl

Copy link
Copy Markdown
Collaborator

/test limit=local

@github-actions

Copy link
Copy Markdown
Contributor

@litaocdl

Copy link
Copy Markdown
Collaborator

/test limit=local

@github-actions

Copy link
Copy Markdown
Contributor

@litaocdl
litaocdl force-pushed the dev/cnp-4151 branch 2 times, most recently from 6b03b34 to 2667601 Compare September 23, 2023 08:58
@litaocdl

Copy link
Copy Markdown
Collaborator

/test limit=local

@github-actions

Copy link
Copy Markdown
Contributor

@litaocdl

Copy link
Copy Markdown
Collaborator

now the e2e pass, the failure in ugprade is waiting for cluster ready, but already have two pod ready and the third one with pvc in pending status, which is not with this change.

@litaocdl

Copy link
Copy Markdown
Collaborator

/test limit=local

@github-actions

Copy link
Copy Markdown
Contributor

@litaocdl
litaocdl force-pushed the dev/cnp-4151 branch 2 times, most recently from 6d78e7b to 2194f94 Compare September 24, 2023 23:11
@litaocdl

Copy link
Copy Markdown
Collaborator

/test limit=local

@github-actions

Copy link
Copy Markdown
Contributor

@litaocdl

Copy link
Copy Markdown
Collaborator

/test limit=local

@github-actions

Copy link
Copy Markdown
Contributor

@litaocdl

Copy link
Copy Markdown
Collaborator

/test limit=local

@litaocdl

Copy link
Copy Markdown
Collaborator

@gbartolini
gbartolini merged commit 9f7f18c into cloudnative-pg:main Sep 25, 2023
litaocdl added a commit that referenced this pull request Sep 26, 2023
IMPORTANT: The default value of `stopDelay` has now been
changed to 1800 seconds, equivalent of half an hour.

Previously, it was set to 30 seconds.

This patch also introduces a new parameter, called `smartStopDelay`,
to control the window of time reserved for the smart shutdown of
Postgres to complete. The general formula to compute the overall
timeout to stop Postgres is `max(stopDelay -  smartStopDelay, 30)`.

Closes #2844

Signed-off-by: YanniHu1996 <[email protected]>
Signed-off-by: Tao Li <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Co-authored-by: Tao Li <[email protected]>
Co-authored-by: Armando Ruocco <[email protected]>
Co-authored-by: Gabriele Bartolini <[email protected]>
litaocdl added a commit that referenced this pull request Sep 26, 2023
IMPORTANT: The default value of `stopDelay` has now been
changed to 1800 seconds, equivalent of half an hour.

Previously, it was set to 30 seconds.

This patch also introduces a new parameter, called `smartStopDelay`,
to control the window of time reserved for the smart shutdown of
Postgres to complete. The general formula to compute the overall
timeout to stop Postgres is `max(stopDelay -  smartStopDelay, 30)`.

Closes #2844

Signed-off-by: YanniHu1996 <[email protected]>
Signed-off-by: Tao Li <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Co-authored-by: Tao Li <[email protected]>
Co-authored-by: Armando Ruocco <[email protected]>
Co-authored-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Tao Li <[email protected]>
@mnencia
mnencia deleted the dev/cnp-4151 branch December 24, 2024 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested ◀️ This pull request should be backported to all supported releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce smartStopDelay to control smart shutdown

4 participants