db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-4428) Add proper delete mechanism for in-memory databases
Date Mon, 16 Nov 2009 16:31:39 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kristian Waagan updated DERBY-4428:
-----------------------------------

    Attachment: derby-4428-1a-in_memory_specific_delete_code.stat
                derby-4428-1a-in_memory_specific_delete_code.diff

Patch 1a is a suggestion for the code required in the in-memory module to support drop database.
The idea is to delete all traces of the database when the storage factory is shut down  *and*
the database has been scheduled for deletion. The latter part is true if the data store has
detected that the service root has been deleted.

Patch ready for review.

Missing pieces of code:
 a) Introduction and handling of new URL attribute, including a new SQLState / message. Most
of this will probably go into EmbedConnection.
 b) Actually shutting down and deleting the database. Code will go into EmbedConnection and
maybe into one of the context classes.
 c) Database access block mechanism (not really required to implement drop database, but not
having it will make the drop database process more messy). This code will most likely go into
EmbedConnection, BasicDatabase/Database and maybe BaseMonitor.

I think I'll combine (a) and (b), and add (c) as a later step.

> Add proper delete mechanism for in-memory databases
> ---------------------------------------------------
>
>                 Key: DERBY-4428
>                 URL: https://issues.apache.org/jira/browse/DERBY-4428
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC, Services, Store
>    Affects Versions: 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>         Attachments: derby-4428-0a-preview_patch.diff, derby-4428-1a-in_memory_specific_delete_code.diff,
derby-4428-1a-in_memory_specific_delete_code.stat
>
>
> The current mechanism for deleting in-memory databases isn't good enough, and a proper
one must be added.
> It is also important to be able to delete in-memory databases, since they occupy valuable
main memory that should be discarded when the database is no longer needed.
> I intend to implement the mechanism by using the JDBC connection URL:
> "jdbc:derby:memory:myDatabase;delete=true[;user=X;password=Y]
> The connection attempt will throw an exception in any case, either because the request
failed or because it succeeded.
> Reasons for a failure can be invalid user and/or password, lacking encryption attributes,
or conflicting attributes.
> For the time being, only the database owner will be allowed to delete databases (*note*:
do we have a way to control/limit in-memory database creation?)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message