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 Thu, 26 Nov 2009 12:49: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-2b-generic_db_drop.diff

Attached patch 2b.
Major changes from 2a:
 - adjusted test ErrorCodeTest (failed due to the newly added messages)
 - the requirement for the user to be the DBO when dropping is only enforced when authentication
and authorization are enabled (this follows the current pattern in EmbedConnection)

Committed to trunk with revision 884542.
I didn't get any comments on the patch, but it's not too late to review of course :)

Things to consider:
 - How long should we wait before dropping the database? (see the sleep in EmbedConnection)
   I expect this will change when the block mechanism has been implemented. The longer the
wait, the higher the chance that connected clients will get a reasonable exception.
 - I have reused some messages, for instance if the user isn't the DBO and when trying to
delete a on-disk database. Is this ok, or should I add new ones?

I'll continue working on the access block mechanism (DERBY-4447), and the new feature has
to be documented. I also think I have to do some more testing with the client driver, as I've
found at least one Jira issue indicating the error handling isn't  good enough.

> 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
>             Fix For: 10.6.0.0
>
>         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, derby-4428-1b-in_memory_specific_delete_code.diff,
derby-4428-2a-generic_db_drop.diff, derby-4428-2b-generic_db_drop.diff, derby-4428-3a-canonical_name_handling.diff,
derby-4428-3b-canonical_name_handling.diff
>
>
> 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