linuxcali / jain-slee

Automatically exported from code.google.com/p/jain-slee
0 stars 1 forks source link

Diameter response lost as activity starts in non suspended mode #100

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Issue: Creating Diameter activity starts them in non suspended mode. 
Problem: This can cause a loss of first Diameter response if the response comes 
earlier than the SBB entity attachment to Diameter ACI transaction commits.

Reproduce scenario (all must be done in a single event e.g. onServiceStarted):
1. Create Diameter activity by calling: 
net.java.slee.resource.diameter.cca.CreditControlProvider.createClientSession()
2. Attach SBB entity to its ACI
3. Create and send Diameter request (e.g. CCR) to diameter server
4. Wait more time than required for Diameter answer (CCA) to come (could do 
some long processing work here or Thread.sleep for 10 seconds or more) - i.e. 
the answer must come earlier than onServiceStarted event can be finished.

Result: 
The response event (CCA) is missed because SBB entity is only going to be 
attached to ACI after the onServiceStarted finishes (transaction commits). 
Since the diameter activity is started in non-suspended mode, the CCA response 
event is lost.

The issue exists from 1.4.0 FINAL version in Diameter CCA RA and appeared after 
this fix:
http://code.google.com/p/mobicents/issues/detail?id=3114

Other Diameter based RAs (Cca, Ro, Rf, Sh, ...) might have the same problem.
Attaching an example patch to fix this issue for Diameter CCA RA below.

Original issue reported on code.google.com by be.lietaus on 20 Feb 2014 at 9:29

Attachments: