Issue Details (XML | Word | Printable)

Key: DERBY-3575
Type: Improvement Improvement
Status: Closed Closed
Resolution: Won't Fix
Priority: Minor Minor
Assignee: Kristian Waagan
Reporter: Kristian Waagan
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

Optimize client side LOB release mechanism by reducing the number of round-trips

Created: 28/Mar/08 07:55 AM   Updated: 04/May/09 06:22 PM
Return to search
Component/s: Network Client
Affects Version/s: 10.4.1.3, 10.5.1.1
Fix Version/s: None

Time Tracking:
Issue & Sub-Tasks
Issue Only
Not Specified

Issue Links:
Reference
 

Resolution Date: 03/Apr/08 02:27 PM

Sub-Tasks  All   Open   
No sub-tasks match this view.

 Description  « Hide
The current mechanism for freeing LOB locators from the client driver, is to invoke a stored procedure for each LOB locator every time the result set position is changed. This can potentially result in a number of round-trips to the server.

The mechanism can easily be optimized by adding a stored procedure that takes a list of LOB locators and frees them all. The level of optimization can be tweaked by changing the timing of the stored procedure invocation, and this must also be balanced with regards to resource consumption on the server. The more LOB locators we collect on the client before we send the release request, the more memory is bound to LOB resources on the server.

Possible release points:
 * on each result set positioning
 * when a threshold value is reached
 * on result set close
 * when Blob/Clob.free is called (problematic, as the Blob/Clob is detached from the result set)

There are some compatibility issues to consider, and the client driver will most likely have to implement both the naive and the optimized mechanism. For this reason, it might be good if the release mechanism can be tightly encapsulated (for instance within LOBStateTracker).

Note that piggy-backing the locators would be the most effective solution, but it is likely that implementing it requires more time and thus I'm reluctant to do so this close to the release. I'm saying this because we do need a fix to go into 10.4.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Kristian Waagan added a comment - 31/Mar/08 11:05 AM
Setting fix version to indicate I want to get this in for 10.4.

Kristian Waagan added a comment - 01/Apr/08 07:22 PM
After getting feedback from Knut Anders and reconsidering, in addition to the limited time left before the release candidate is produced, I'm strongly thinking about closing this as "Won't fix".

The points Knut Anders raised about code maintenance/complexity and compatibility are very valid and good, in my opinion.
Further, just using the simple release mechanism is still an improvement over the current situation.

Unless someone strongly disagrees, I will close this issue and the subtask DERBY-3577 as "Won't fix".

Kristian Waagan added a comment - 03/Apr/08 02:27 PM
Closing as "Won't Fix".
I hope to contribute on the piggy-backing solution for the next release.