You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Anurag Shekhar (JIRA)" <ji...@apache.org> on 2007/05/30 11:40:15 UTC
[jira] Created: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
temporary lob file should be cleaned when the transaction or connection is no longer valid.
-------------------------------------------------------------------------------------------
Key: DERBY-2729
URL: https://issues.apache.org/jira/browse/DERBY-2729
Project: Derby
Issue Type: Bug
Reporter: Anurag Shekhar
Assignee: Anurag Shekhar
Fix For: 10.3.0.0
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
Posted by "Anurag Shekhar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anurag Shekhar updated DERBY-2729:
----------------------------------
Derby Info: [Release Note Needed]
> temporary lob file should be cleaned when the transaction or connection is no longer valid.
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-2729
> URL: https://issues.apache.org/jira/browse/DERBY-2729
> Project: Derby
> Issue Type: Bug
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.0.0
>
> Attachments: derby-2729.diff, releaseNote.html
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
Posted by "Anurag Shekhar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anurag Shekhar updated DERBY-2729:
----------------------------------
Attachment: releaseNote.html
attaching revised released notes
> temporary lob file should be cleaned when the transaction or connection is no longer valid.
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-2729
> URL: https://issues.apache.org/jira/browse/DERBY-2729
> Project: Derby
> Issue Type: Bug
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.0.0
>
> Attachments: derby-2729.diff, releaseNote.html, releaseNote.html, releaseNote.html, releaseNote.html, releaseNote.html, releaseNote.html
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Waagan closed DERBY-2729.
----------------------------------
Closing issue.
> temporary lob file should be cleaned when the transaction or connection is no longer valid.
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-2729
> URL: https://issues.apache.org/jira/browse/DERBY-2729
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.1.4
>
> Attachments: derby-2729.diff, releaseNote.html, releaseNote.html, releaseNote.html, releaseNote.html, releaseNote.html, releaseNote.html
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
Posted by "Anurag Shekhar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500156 ]
Anurag Shekhar commented on DERBY-2729:
---------------------------------------
this patch addresses only blob cleanup. I will be submitting another patch to enable clob cleanup.
> temporary lob file should be cleaned when the transaction or connection is no longer valid.
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-2729
> URL: https://issues.apache.org/jira/browse/DERBY-2729
> Project: Derby
> Issue Type: Bug
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.0.0
>
> Attachments: derby-2729.diff
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas updated DERBY-2729:
---------------------------------
Attachment: releaseNote.html
Attaching another version of the release note, this time replacing the nbsp symbols with spaces.
> temporary lob file should be cleaned when the transaction or connection is no longer valid.
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-2729
> URL: https://issues.apache.org/jira/browse/DERBY-2729
> Project: Derby
> Issue Type: Bug
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.0.0
>
> Attachments: derby-2729.diff, releaseNote.html, releaseNote.html, releaseNote.html, releaseNote.html
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
Posted by "Øystein Grøvlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500237 ]
Øystein Grøvlen commented on DERBY-2729:
----------------------------------------
Unless the JDBC or SQL standards requires a specific error code, I think it is ok to not distinguish between a Lob being invalid because free has been called or because transaction has been terminated. However, I think we should try to make sure the same error code is used both for embedded and client/server and the error text need reflect both causes. It is very straight-forward to fix the client to use the same SQL state as the embedded. I can do that, but we need to agree on which to use.
> temporary lob file should be cleaned when the transaction or connection is no longer valid.
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-2729
> URL: https://issues.apache.org/jira/browse/DERBY-2729
> Project: Derby
> Issue Type: Bug
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.0.0
>
> Attachments: derby-2729.diff
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
Posted by "Anurag Shekhar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anurag Shekhar updated DERBY-2729:
----------------------------------
Attachment: derby-2729.diff
Life cycle of a lob object is within the a transaction. when a connection is closed or a rollback or commit is called, either explicitly by calling
connection.commit or connection.rollback, or a rollback called due to an
exception with severity TRANSACTION or higher or an implicit commit when
autoCommit is set to true.
Locator patch for client has introduced a hash map (lobHashMap) in
EmbeddedConnection to track all the lob associated with the connection
and at commit, rollback and close clearHashMap method is called to
cleanup the hashmap and calling free method on individual hash map.
I am relying on same methods to do cleanup for embedded server.
In the constructor of EmbedBlob calls EmbeddedConnection.addLOBMapping method to add entry for the blob.
I have also added code to call clearLOBMapping when transaction is commited when autoCommit mode is on. And when an StandardException with severity TRANSACTION or higher.
Due to this change the EmbeddedBlob now any call to EmbeddedBlob after commit or rollback now results in exception with SQLState set to SQLState.LOB_OBJECT_INVALID. I have added additional check to see if connection is closed, this ensures the same sql state what is thrown right now without this patch.
Its not possible to determine whether the blob was closed due to explicit call to free or its because transaction is no more valid. So if a blob is accessed after commit/rollback it results in SQLException with SQL state set to SQLState.LOB_OBJECT_INVALID.
modified files
java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
added code to call clearLOBMapping in commitIfNeeded, commitIfAutoCommit and handleException methods.
java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
added call to EmbedConnection to add entry for this object in lobMapping.
added additional check for validity of connection in checkValidity
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java
updated the expected SQLStates.
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobStoredProcedureTest.java
updated the expected locator id. Now blob constructor is adding itself to the lob so the id received by the stored procedure will be different.
> temporary lob file should be cleaned when the transaction or connection is no longer valid.
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-2729
> URL: https://issues.apache.org/jira/browse/DERBY-2729
> Project: Derby
> Issue Type: Bug
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.0.0
>
> Attachments: derby-2729.diff
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
Posted by "Anurag Shekhar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anurag Shekhar updated DERBY-2729:
----------------------------------
Attachment: releaseNote.html
release notes for state change and life cycle of lob due to cleanup.
> temporary lob file should be cleaned when the transaction or connection is no longer valid.
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-2729
> URL: https://issues.apache.org/jira/browse/DERBY-2729
> Project: Derby
> Issue Type: Bug
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.0.0
>
> Attachments: derby-2729.diff, releaseNote.html
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bernt M. Johnsen resolved DERBY-2729.
-------------------------------------
Resolution: Fixed
Committed revision 544777.
> temporary lob file should be cleaned when the transaction or connection is no longer valid.
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-2729
> URL: https://issues.apache.org/jira/browse/DERBY-2729
> Project: Derby
> Issue Type: Bug
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.0.0
>
> Attachments: derby-2729.diff
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
Posted by "Øystein Grøvlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505187 ]
Øystein Grøvlen commented on DERBY-2729:
----------------------------------------
Some comments on the release notes:
- The summary should be a one-liner
- The bold text for embedded driver and client is confusing since they
look similar to the section headings. I suggest not using bold, but
plain text with a succeeding colon, instead.
- Since the behavior is now the same for both client and embedded, I
do not think it is necessary to dwell with previous differences.
That would make things a bit simpler. E.g., instead of mentioning
that the change is only for short lobs, you can just say that it now
holds for all Lobs. That way, I think you do not really need to
write separate statements for client and embedded.
- For the 'Application Changes Required' section, you can refer to the
release note for the locator-based implementation (DERBY-208) for a
discussion on the effects of changing the transaction life span.
- For the first paragraph, I think it is sufficient to say:
"A Blob or Clob object is no longer valid after the termination
(commit or rollback) of the transaction it were created in."
Since transaction cannot live beyond a connection this should cover
that case, but I guess it does not harm to state that explicitly. I
do not think it is necessary to discuss implicit or explicit
commits/rollbacks here.
> temporary lob file should be cleaned when the transaction or connection is no longer valid.
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-2729
> URL: https://issues.apache.org/jira/browse/DERBY-2729
> Project: Derby
> Issue Type: Bug
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.0.0
>
> Attachments: derby-2729.diff, releaseNote.html
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kathey Marsden updated DERBY-2729:
----------------------------------
Component/s: JDBC
> temporary lob file should be cleaned when the transaction or connection is no longer valid.
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-2729
> URL: https://issues.apache.org/jira/browse/DERBY-2729
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.1.4
>
> Attachments: derby-2729.diff, releaseNote.html, releaseNote.html, releaseNote.html, releaseNote.html, releaseNote.html, releaseNote.html
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas updated DERBY-2729:
---------------------------------
Attachment: releaseNote.html
Next rev of this release note. This time, I am turning the naked <br> tags into <br/> because the xml parser is less forgiving than browser parsers are and unterminated tags cause problems.
> temporary lob file should be cleaned when the transaction or connection is no longer valid.
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-2729
> URL: https://issues.apache.org/jira/browse/DERBY-2729
> Project: Derby
> Issue Type: Bug
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.0.0
>
> Attachments: derby-2729.diff, releaseNote.html, releaseNote.html, releaseNote.html, releaseNote.html, releaseNote.html
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501567 ]
Bernt M. Johnsen commented on DERBY-2729:
-----------------------------------------
Patch seems ok to me. I'll commit tomorrow if no-one objects.
> temporary lob file should be cleaned when the transaction or connection is no longer valid.
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-2729
> URL: https://issues.apache.org/jira/browse/DERBY-2729
> Project: Derby
> Issue Type: Bug
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.0.0
>
> Attachments: derby-2729.diff
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas updated DERBY-2729:
---------------------------------
Attachment: releaseNote.html
Attaching a new version of the release note. This adjusts the html formatting so that, hopefully, it can be digested by the release note generator.
> temporary lob file should be cleaned when the transaction or connection is no longer valid.
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-2729
> URL: https://issues.apache.org/jira/browse/DERBY-2729
> Project: Derby
> Issue Type: Bug
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.0.0
>
> Attachments: derby-2729.diff, releaseNote.html, releaseNote.html, releaseNote.html
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2729) temporary lob file should be cleaned
when the transaction or connection is no longer valid.
Posted by "Anurag Shekhar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anurag Shekhar updated DERBY-2729:
----------------------------------
Attachment: releaseNote.html
thanks Øystein for the review. I am posting revised release notes.
> temporary lob file should be cleaned when the transaction or connection is no longer valid.
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-2729
> URL: https://issues.apache.org/jira/browse/DERBY-2729
> Project: Derby
> Issue Type: Bug
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.0.0
>
> Attachments: derby-2729.diff, releaseNote.html, releaseNote.html
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.