Bug 1420

Summary: Protocols in Transport Cache not amenable for strict policy enforcement
Product: TAO Reporter: Nanbor Wang <bala>
Component: ORBAssignee: DOC Center Support List (internal) <tao-support>
Status: NEW ---    
Severity: normal CC: sm
Priority: P3    
Version: 1.2.8   
Hardware: All   
OS: All   
Attachments: diffs for connection_purging test

Description Nanbor Wang 2003-01-12 10:25:16 CST
The present protocol within the cache manager is not at all suitable for any 
strict policy (like max cache size and max muxed connections) enforcement. A 
test case will be attached, thanks to Simon McQueen, which shows this problem. 
This doesnt show up in normal MT use cases

Problem:
--------
Thread making an invocation first checks in the cache and if the lookup fails 
the thread goes to create a new connection trying to purge old connections in 
the process. In MT scenario as shown in the patch, it could happen that all 
threads check in the cache more or less in the same time and go to create more 
connections. The policies that are applied may have no effect on them. This 
could be wrong. 

Solution:
---------
Slight change in the existing protocol: The invocation thread on a failed 
lookup for existing connections should not return empty handed, but create a 
dummy entry but leave the entry as busy. Once an entry is created it is easier 
to enforce these policies -- like say we could purge after the entry is created 
and do the rest of the work like making a connection. This would be easier, 
since the thread  could collect all the entries that need purging and then 
release the cache lock, do the purging outside the context of the cache lock 
and go ahead to do the remote connection.

The only catch here is to release the entry properly when connection 
initialization has failed. 

Will attach the test case in the next checkin. BTW, this would require changes 
to the interface and can be taken up only after x.3.1
Comment 1 Nanbor Wang 2003-01-12 10:26:26 CST
Created attachment 179 [details]
diffs for connection_purging test
Comment 2 Nanbor Wang 2003-01-12 10:26:45 CST
Assigning it to me
Comment 3 Simon McQueen 2003-01-15 06:48:00 CST
Reassigning.
Comment 4 Simon McQueen 2003-01-15 06:48:39 CST
Accepting.
Comment 5 Johnny Willemsen 2004-08-02 09:36:28 CDT
I will handle this
Comment 6 Johnny Willemsen 2004-08-02 09:36:38 CDT
accept
Comment 7 Johnny Willemsen 2006-02-24 08:14:55 CST
bakc to the pool