Skip to content

Conversation

@shrikantjoshi-hpe
Copy link
Contributor

Description

This PR addresses a session leak issue in the Primera storage adapter by updating the disconnect method to ensure sessions are properly terminated. Additionally, a new logout method has been introduced to explicitly handle session cleanup. These changes improve resource management and prevent lingering sessions that could impact system stability.

The disconnect method now calls the new logout method to ensure sessions are closed.
The logout method encapsulates the logic for terminating sessions with the storage system.
This is a bug fix aimed at improving reliability and resource usage.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

N/A

How Has This Been Tested?

  • Deploying the updated adapter in a test environment.
  • Performing storage operations that trigger the disconnect method.
  • Verifying that sessions are properly terminated and no session leaks occur.
  • Monitoring logs and resource usage to confirm expected behavior.

How did you try to break this feature and the system with this change?

  • Attempted multiple connect/disconnect cycles to ensure sessions do not accumulate.
  • Checked for any side effects on other storage operations.
  • Validated that the new logout method does not interfere with normal adapter functionality.

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@codecov
Copy link

codecov bot commented Aug 20, 2025

Codecov Report

❌ Patch coverage is 0% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.17%. Comparing base (c6daeb4) to head (3dbb587).
⚠️ Report is 20 commits behind head on 4.20.

Files with missing lines Patch % Lines
...rage/datastore/adapter/primera/PrimeraAdapter.java 0.00% 23 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #11487      +/-   ##
============================================
- Coverage     16.17%   16.17%   -0.01%     
- Complexity    13285    13287       +2     
============================================
  Files          5656     5656              
  Lines        498000   498043      +43     
  Branches      60401    60409       +8     
============================================
+ Hits          80539    80543       +4     
- Misses       408496   408538      +42     
+ Partials       8965     8962       -3     
Flag Coverage Δ
uitests 4.00% <ø> (-0.01%) ⬇️
unittests 17.02% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shrikantjoshi-hpe
Copy link
Contributor Author

@harikrishna-patnala, @sureshanaparti could you please review the PR? @DaanHoogland is there anything we can do to help speed up the PR review and merge process?

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm. Specific to Primera plugin so not everyone can test

@shwstppr
Copy link
Contributor

shwstppr commented Sep 5, 2025

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@shwstppr
Copy link
Contributor

shwstppr commented Sep 5, 2025

@shrikantjoshi-hpe it seems the PR is fixing an issue. Should this be targeted for the 4.20 branch?

@shrikantjoshi-hpe
Copy link
Contributor Author

Yes, we can target it for the 4.20 branch

@blueorangutan
Copy link

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 14863

@shwstppr
Copy link
Contributor

shwstppr commented Sep 5, 2025

@shrikantjoshi-hpe you will have to rebase your branch to 4.20 for targeting it for 4.20/4.20.2

@shrikantjoshi-hpe
Copy link
Contributor Author

@shwstppr Does it mean we need to raise the new PR post-rebase targeting the 4.20 branch?

@shwstppr
Copy link
Contributor

shwstppr commented Sep 5, 2025

@shrikantjoshi-hpe either way would work.
Either rebase your branch to 4.20, change the base branch to 4.20 near the top of the PR or close this PR and start a new one targeting 4.20

@shrikantjoshi-hpe
Copy link
Contributor Author

Rebase the branch to 4.20, change the base branch to 4.20 near the top of the PR

@github-actions
Copy link

github-actions bot commented Sep 8, 2025

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@shwstppr
Copy link
Contributor

shwstppr commented Sep 8, 2025

@shrikantjoshi-hpe your branch is not rebased correctly. If 6c8fe7a is the only change then you can do something like,

git checkout <APACHE_REMOTE> 4.20
git branch -D sessionleak
git checkout -b sessionleak
git cherry-pick 6c8fe7ac5bd9ac3dd86ec93f7a00b2193cf28440
git push <YOUR_REMOTE> sessionleak -fv

@shrikantjoshi-hpe
Copy link
Contributor Author

@shwstppr, Done as you asked. Thanks

@shwstppr
Copy link
Contributor

shwstppr commented Sep 8, 2025

Thanks @shrikantjoshi-hpe

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14890

@weizhouapache
Copy link
Member

@shrikantjoshi-hpe
thanks for the update
we cannot test your changes, do you think it is ready for merge ?

@weizhouapache weizhouapache self-assigned this Sep 8, 2025
@shrikantjoshi-hpe
Copy link
Contributor Author

This implementation is scoped specifically to the primera storage plugin. Extensive testing has been completed with no regression issues identified. We can merge it safely.

@weizhouapache
Copy link
Member

This implementation is scoped specifically to the primera storage plugin. Extensive testing has been completed with no regression issues identified. We can merge it safely.

@shrikantjoshi-hpe great,
Merging then

@weizhouapache weizhouapache merged commit 90681df into apache:4.20 Sep 8, 2025
25 of 26 checks passed
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants