[ACE-266] checkNewActivationMplsFeasibility Created: 04/Nov/25  Updated: 03/Dec/25  Due: 05/Nov/25

Status: Ready for QA
Project: ACE
Component/s: FN
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: Salem Dannawi Assignee: Salem Dannawi
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Customer:
Mobinets
Planned Start:
Planned End:

 Description   

checkNewActivationMplsFeasibility
internal API is not returning data in UI



 Comments   
Comment by Zein Trabelsi [ 03/Dec/25 ]

Replace entity-based queries with DTO-based queries using QueryDSL projections. This addresses performance and lazy loading issues. The new approach uses Projections.constructor() to map query results directly to DTOs (ServiceTrailDto, ServiceTrailHopDto), avoiding eager loading of entities and slow views like FN_DETAILED_OSP_CONNECTION_V. A key change is that the refactored code no longer relies on the slow database views (FN_DETAILED_OSP_CONNECTION_V and FN_OSP_CONNECTION_VIEW) and instead queries the OspConnection entity directly from the base table, significantly improving query performance. Batch fetching was implemented to load hops and OSP connections in single queries instead of N+1 patterns, reducing database round trips from hundreds to 3–4 queries per request.

Generated at Wed Apr 15 14:42:48 EEST 2026 using JIRA 6.1.4#6159-sha1:44eaedef2e4a625c6c7183698b2468d4719c20dc.