Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[#249] Fix of port number leak in NodeBackup::spawn_replica#250

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
PostgresNode::_release_resource is added
This private method releases all the allocated node resources (port and so on).PostgresNode::__exit__ calls this new method instead free_port.
  • Loading branch information
@dmitry-lipetsk
dmitry-lipetsk committedMay 4, 2025
commit10ebf18f0c60b9e88db0d99e3823993045420adf
5 changes: 4 additions & 1 deletiontestgres/node.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -244,7 +244,7 @@ def __exit__(self, type, value, traceback):
else:
self._try_shutdown(attempts)

self.free_port()
self._release_resources()

def __repr__(self):
return "{}(name='{}', port={}, base_dir='{}')".format(
Expand DownExpand Up@@ -663,6 +663,9 @@ def _try_shutdown(self, max_attempts, with_force=False):
ps_output,
ps_command)

def _release_resources(self):
self.free_port()

@staticmethod
def _throw_bugcheck__unexpected_result_of_ps(result, cmd):
assert type(result) == str # noqa: E721
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp