Skip to content

[#247] PortManager__Generic uses lock-dirs for reserved ports #255

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

dmitry-lipetsk
Copy link
Collaborator

@dmitry-lipetsk dmitry-lipetsk commented May 6, 2025

New structures

  • OsLockObj: base (abstract) class to manage fs-based lock object.

Critical changes

  • utils.bound_ports is removed

Closes #247
Closes #256

- [FIX] A creation of self._log_dir is moved to reserve_port method
- Code normalization [copy&paste mistakes]
- New asserts are added
- New comments are added
@dmitry-lipetsk
Copy link
Collaborator Author

dmitry-lipetsk commented May 7, 2025

Patch was tested with probackup2.

This idea was taken from PgBouncer tests.
1) PortManager__Generic uses OsOperations::create_lock_fs_obj to create a lock object
2) utils.bound_ports is removed

- TestTestgresLocal.test_ports_management is deleted
- TestOsOpsCommon.test_create_lock_fs_obj is added
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port number 65535 is valid for using Using lock files for port reservation
1 participant