Skip to content

Conversation

shwstppr
Copy link
Contributor

@shwstppr shwstppr commented Sep 1, 2025

Description

This change introduces caching of frequently accessed entities in CallContext to reduce repeated database lookups during VM deployment. By reusing cached values for common entries, the deployment workflow becomes more efficient, reducing overhead and improving overall performance.

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):

How Has This Been Tested?

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

Copy link

codecov bot commented Sep 1, 2025

Codecov Report

❌ Patch coverage is 40.00000% with 123 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.37%. Comparing base (3d6ec29) to head (7f3a394).

Files with missing lines Patch % Lines
...a/com/cloud/network/router/CommandSetupHelper.java 20.00% 28 Missing ⚠️
...c/main/java/com/cloud/utils/db/GenericDaoBase.java 0.00% 19 Missing ⚠️
...om/cloud/network/element/VirtualRouterElement.java 23.80% 16 Missing ⚠️
.../apache/cloudstack/context/RequestEntityCache.java 47.82% 5 Missing and 7 partials ⚠️
...ain/java/com/cloud/storage/StorageManagerImpl.java 44.44% 10 Missing ⚠️
...n/java/com/cloud/capacity/CapacityManagerImpl.java 0.00% 8 Missing ⚠️
...om/cloud/deploy/DeploymentPlanningManagerImpl.java 80.95% 5 Missing and 3 partials ⚠️
...torage/allocator/AbstractStoragePoolAllocator.java 0.00% 4 Missing ⚠️
...n/java/com/cloud/vm/VirtualMachineManagerImpl.java 40.00% 3 Missing ⚠️
...ava/org/apache/cloudstack/context/CallContext.java 50.00% 2 Missing ⚠️
... and 7 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11549      +/-   ##
============================================
+ Coverage     17.36%   17.37%   +0.01%     
- Complexity    15237    15251      +14     
============================================
  Files          5888     5889       +1     
  Lines        525741   525846     +105     
  Branches      64164    64181      +17     
============================================
+ Hits          91274    91347      +73     
- Misses       424167   424171       +4     
- Partials      10300    10328      +28     
Flag Coverage Δ
uitests 3.63% <ø> (ø)
unittests 18.41% <40.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.

…ment

This change introduces caching of frequently accessed entities in CallContext
to reduce repeated database lookups during VM deployment. By reusing cached
values for common entries, the deployment workflow becomes more efficient,
reducing overhead and improving overall performance.

Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
@shwstppr shwstppr force-pushed the cache-findbyid-deployinfra branch from 4907ac0 to 7f3a394 Compare September 5, 2025 11:43
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.

1 participant