Issue Details (XML | Word | Printable)

Key: DERBY-3365
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Kathey Marsden
Reporter: Kathey Marsden
Votes: 0
Watchers: 0
Operations

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

Network Server stores a duplicate entry in the lob hash map for every lob

Created: 30/Jan/08 04:54 PM   Updated: 01/Feb/08 05:25 PM
Return to search
Component/s: Network Server
Affects Version/s: None
Fix Version/s: 10.3.3.0, 10.4.1.3

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works derby-3365_diff.txt 2008-01-30 11:19 PM Kathey Marsden 12 kB
Text File Licensed for inclusion in ASF works derby-3365_stat.txt 2008-01-30 11:19 PM Kathey Marsden 0.8 kB
Issue Links:
Reference
 

Resolution Date: 01/Feb/08 05:25 PM


 Description  « Hide
Per discussion in DERBY-3243, Network Server stores a duplicate entry in the lob hashmap for every lob. I posted a preliminary patch to DERBY-3243 and received comments on the patch in that issue, but it makes more sense to separate the issue out from DERBY-3243. So opening up this new issue.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Kathey Marsden made changes - 30/Jan/08 04:55 PM
Field Original Value New Value
Link This issue is related to DERBY-3243 [ DERBY-3243 ]
Kathey Marsden added a comment - 30/Jan/08 04:55 PM
Early patch and discussion is in DERBY-3243

Kathey Marsden added a comment - 30/Jan/08 11:19 PM
Attached is a follow-up patch derby-3365_diff.txt incorporating review comments from my patch attached to DERBY-3243
(derby-3243_fix_double_hashmap_entry_diff.txt)
I'm sorry Knut I missed your original post about the patch.
Hopefully all the changes are in this time. For this revision I fixed the typos and changed the lob create stored procedures to use getLocator().


I did not move the addlobLocator call to getLocator() because it would cause a regression for the DERBY-2787 fix. I will leave any optimization in this area to the DERBY-3354 fix.

Kathey Marsden made changes - 30/Jan/08 11:19 PM
Attachment derby-3365_diff.txt [ 12374422 ]
Attachment derby-3365_stat.txt [ 12374423 ]
Kathey Marsden made changes - 30/Jan/08 11:20 PM
Summary Network Server stores a dupliacate entry in the lob hash map for every lob Network Server stores a duplicate entry in the lob hash map for every lob
Knut Anders Hatlen added a comment - 31/Jan/08 12:07 PM
Looks fine to me. In BrokeredConnection, you should also remove the javadoc comment for addLOBMapping().

I'm wondering, should EngineBlob and EngineClob have been in iapi.jdbc rather than impl.jdbc? That's where the rest of the engine interfaces are located.

Repository Revision Date User Message
ASF #617186 Thu Jan 31 18:48:30 UTC 2008 kmarsden DERBY-3365 Network Server stores a duplicate entry in the lob hash map for every lob

Change network server to use existing lob hash map entry instead of creating a second entry.
Files Changed
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineConnection.java
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStoredProcedure.java
ADD /db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineBlob.java
ADD /db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineClob.java
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClobStoredProcedureTest.java
REPLACE /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
MODIFY /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobStoredProcedureTest.java
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java

Kathey Marsden added a comment - 31/Jan/08 09:55 PM
Thanks Knut for looking at the patch. You are right about EngineClob and EngineBlob. Not sure how I managed to make them where I did, a matter of Eclipse making things too easy I think. I moved them before I committed.


Knut Anders Hatlen added a comment - 31/Jan/08 11:29 PM
Thanks Kathey. I noticed that the commit log looked a bit odd for this check-in. It says that EmbedBlob.java was added, and lists the entire file with plus lines in the diff. Do you know what happened?

Repository Revision Date User Message
ASF #617294 Thu Jan 31 23:40:28 UTC 2008 kahatlen An attempt to restore history for EmbedBlob.java after being replaced
rather than updated by check-in for DERBY-3365.

$ cd java/engine/org/apache/derby/impl/jdbc
$ cp EmbedBlob.java EmbedBlob.java.old
$ svn remove EmbedBlob.java
$ svn copy -r 617185 EmbedBlob.java .
$ cp EmbedBlob.java.old EmbedBlob.java
$ svn ci
Files Changed
REPLACE /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java (from /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java)

Knut Anders Hatlen added a comment - 31/Jan/08 11:45 PM
Hmm, I guess your IDE or something must have tricked you into replacing (that is, removing + adding) EmbedBlob.java rather than modifying it. I managed to restore the file history by this sequence of commands:

$ cd java/engine/org/apache/derby/impl/jdbc
$ cp EmbedBlob.java EmbedBlob.java.old
$ svn remove EmbedBlob.java
$ svn copy -r 617185 EmbedBlob.java .
$ cp EmbedBlob.java.old EmbedBlob.java
$ svn ci

Now "svn annotate" shows the correct information, and not that all lines were changed by kmarsden in revision 617186. Hope I didn't break anything in the process...

Kathey Marsden added a comment - 31/Jan/08 11:47 PM
Thanks Knut for fixing that up.


Repository Revision Date User Message
ASF #617566 Fri Feb 01 17:23:20 UTC 2008 kmarsden [C:/svn/10.3] cat svn-commit.9.tmp
DERBY-3365 Network Server stores a duplicate entry in the lob hash map for every lob

port revision 617186 from trunk and fix EmbedBlob replacement
Files Changed
MODIFY /db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/jdbc/EngineConnection.java
MODIFY /db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/jdbc/LOBStoredProcedure.java
MODIFY /db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java
ADD /db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/jdbc/EngineBlob.java
ADD /db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/jdbc/EngineClob.java
MODIFY /db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClobStoredProcedureTest.java
MODIFY /db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobStoredProcedureTest.java
MODIFY /db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
MODIFY /db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java
MODIFY /db/derby/code/branches/10.3/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
MODIFY /db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java

Kathey Marsden added a comment - 01/Feb/08 05:25 PM
committed change to 10.3 and trunk.

Kathey Marsden made changes - 01/Feb/08 05:25 PM
Resolution Fixed [ 1 ]
Fix Version/s 10.3.2.2 [ 12312885 ]
Fix Version/s 10.4.0.0 [ 12312540 ]
Status Open [ 1 ] Closed [ 6 ]
Repository Revision Date User Message
ASF #639468 Thu Mar 20 21:30:26 UTC 2008 kmarsden Update BlobStoredProcedureTest for fix for DERBY-3365 (617186)
Files Changed
MODIFY /db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobStoredProcedureTest.java

Repository Revision Date User Message
ASF #639709 Fri Mar 21 16:44:30 UTC 2008 kmarsden java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
Updated for new System tables.

java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
Updated for new error messages.

java/testing/org/apache/derbyTesting/functionTests/tests/lang/GrantRevokeDDLTest.java
Updated for new System Tables

java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClobStoredProcedureTest.java

Updated for DERBY-3365 Network Server stores a duplicate entry in the lob hash map for every lob

Change network server to use existing lob hash map entry instead of creating a second entry.

java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DMDBugsTest.java
Updated for new system table

java/testing/org/apache/derbyTesting/functionTests/master/ij7.out

Update for new System tables.

java/testing/org/apache/derbyTesting/functionTests/master/dml149.out

Update for nullable column width
Files Changed
MODIFY /db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
MODIFY /db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GrantRevokeDDLTest.java
MODIFY /db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DMDBugsTest.java
MODIFY /db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
MODIFY /db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClobStoredProcedureTest.java
MODIFY /db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/master/dml149.out
MODIFY /db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out