[ 
https://issues.apache.org/jira/browse/QPID-5485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13876825#comment-13876825
 ] 

Andrew Stitcher commented on QPID-5485:
---------------------------------------

I don't think the above scheme is necessary:

* If --paging-dir is specified then we use that directory.
* If not then we use a specified directory under the datadir.

The requirement is just that we never use the datadir or any directlry where 
there might be files used for other purposes (unless the user has explicitly 
told us to).

In either of these cases we use O_TRUNC not C_EXCL and we delete files only on 
queue deletion.

This should give us one use case for the files; leave the files in place during 
there use, so that the admins can see them; Delete the files in the usual case 
of correct queue deletion. But on crash and restart just zero out the file and 
start from scratch with no complaint.

We don't have to worry about any non queue file because we by definition use an 
empty directory that only take paging files by default.

If the user specifies a paging directory themselves then it is their 
responsibility to make sure it is onyl used to hold paging files, because there 
is no way that qpid can ensure it.

>  Deleting paged queue does not remove underlying file
> -----------------------------------------------------
>
>                 Key: QPID-5485
>                 URL: https://issues.apache.org/jira/browse/QPID-5485
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: 0.24
>         Environment: (any posix system)
>            Reporter: Pavel Moravec
>            Assignee: Pavel Moravec
>            Priority: Minor
>              Labels: easyfix, easytest, patch
>             Fix For: 0.27
>
>
> Description of problem:
> When deleting a paged queue, the broker does not delete the underlying file 
> it created in /var/lib/qpidd directory.
> Version-Release number of selected component (if applicable):
> MRG-M 3.0 EA (qpid-cpp 0.22-29)
> How reproducible:
> 100%
> Steps to Reproduce:
> 0. service qpiddd restart
> 1. qpid-send -a "PagedQueue; {create:always, delete:always, node: { 
> x-declare: {arguments: {'qpid.paging':'True' }}}}"
> 2. file /var/lib/qpidd/PagedQueue 
> Actual results:
> /var/lib/qpidd/PagedQueue: data
> Expected results:
> /var/lib/qpidd/PagedQueue: cannot open `/var/lib/qpidd/PagedQueue' (No such 
> file or directory)
> Additional info:



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to