You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Alan Conway (JIRA)" <qp...@incubator.apache.org> on 2008/06/25 23:28:44 UTC
[jira] Created: (QPID-1148) c++ broker: need abstraction layer for
flock and lockf posix calls.
c++ broker: need abstraction layer for flock and lockf posix calls.
-------------------------------------------------------------------
Key: QPID-1148
URL: https://issues.apache.org/jira/browse/QPID-1148
Project: Qpid
Issue Type: Bug
Components: C++ Broker
Reporter: Alan Conway
Assignee: Alan Conway
The broker code uses posix calls lockf and flock for file locking. These calls need to be moved to abstraction classes in qpid::sys so that porting work (in particular to windows) can replace the implementations without having to refactor top-level broker code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (QPID-1148) c++ broker: need abstraction layer for
flock and lockf posix calls.
Posted by "Alan Conway (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alan Conway closed QPID-1148.
-----------------------------
Resolution: Fixed
> c++ broker: need abstraction layer for flock and lockf posix calls.
> -------------------------------------------------------------------
>
> Key: QPID-1148
> URL: https://issues.apache.org/jira/browse/QPID-1148
> Project: Qpid
> Issue Type: Bug
> Components: C++ Broker
> Reporter: Alan Conway
> Assignee: Alan Conway
>
> The broker code uses posix calls lockf and flock for file locking. These calls need to be moved to abstraction classes in qpid::sys so that porting work (in particular to windows) can replace the implementations without having to refactor top-level broker code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (QPID-1148) c++ broker: need abstraction layer for
flock and lockf posix calls.
Posted by "Steve Huston (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Huston updated QPID-1148:
-------------------------------
Attachment: lockfile.diff
> c++ broker: need abstraction layer for flock and lockf posix calls.
> -------------------------------------------------------------------
>
> Key: QPID-1148
> URL: https://issues.apache.org/jira/browse/QPID-1148
> Project: Qpid
> Issue Type: Bug
> Components: C++ Broker
> Reporter: Alan Conway
> Assignee: Alan Conway
> Attachments: lockfile.diff
>
>
> The broker code uses posix calls lockf and flock for file locking. These calls need to be moved to abstraction classes in qpid::sys so that porting work (in particular to windows) can replace the implementations without having to refactor top-level broker code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (QPID-1148) c++ broker: need abstraction layer
for flock and lockf posix calls.
Posted by "Alan Conway (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12637462#action_12637462 ]
Alan Conway commented on QPID-1148:
-----------------------------------
These patches look good to me.
> c++ broker: need abstraction layer for flock and lockf posix calls.
> -------------------------------------------------------------------
>
> Key: QPID-1148
> URL: https://issues.apache.org/jira/browse/QPID-1148
> Project: Qpid
> Issue Type: Bug
> Components: C++ Broker
> Reporter: Alan Conway
> Assignee: Alan Conway
> Attachments: filesysdir.diff, lockfile.diff
>
>
> The broker code uses posix calls lockf and flock for file locking. These calls need to be moved to abstraction classes in qpid::sys so that porting work (in particular to windows) can replace the implementations without having to refactor top-level broker code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (QPID-1148) c++ broker: need abstraction layer for
flock and lockf posix calls.
Posted by "Steve Huston (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Huston resolved QPID-1148.
--------------------------------
Resolution: Fixed
Fix Version/s: M4
Changes from all 3 diffs committed - svn revision 702513.
> c++ broker: need abstraction layer for flock and lockf posix calls.
> -------------------------------------------------------------------
>
> Key: QPID-1148
> URL: https://issues.apache.org/jira/browse/QPID-1148
> Project: Qpid
> Issue Type: Bug
> Components: C++ Broker
> Reporter: Alan Conway
> Assignee: Alan Conway
> Fix For: M4
>
> Attachments: filesysdir.diff, lockfile.diff, makefile_am.diff
>
>
> The broker code uses posix calls lockf and flock for file locking. These calls need to be moved to abstraction classes in qpid::sys so that porting work (in particular to windows) can replace the implementations without having to refactor top-level broker code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (QPID-1148) c++ broker: need abstraction layer for
flock and lockf posix calls.
Posted by "Steve Huston (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Huston reopened QPID-1148:
--------------------------------
I'm requesting some additional review on this issue with respect to changes made during the Windows port. This was discussed with Andrew Stitcher as well via email, so he may want to weigh in.
Basically, the idea here (lockfile.diff patch attached) is to stop including a platform-specific header from the qpid/sys level, instead using a platform-private class to hold platform details and the sys-level LockFile class refers to the private class.
Additionally, this adds readPid() and writePid() methods to handle the pid as used in the broker. qpid/broker/Daemon.cpp change to use that is included in the patch as well.
> c++ broker: need abstraction layer for flock and lockf posix calls.
> -------------------------------------------------------------------
>
> Key: QPID-1148
> URL: https://issues.apache.org/jira/browse/QPID-1148
> Project: Qpid
> Issue Type: Bug
> Components: C++ Broker
> Reporter: Alan Conway
> Assignee: Alan Conway
> Attachments: lockfile.diff
>
>
> The broker code uses posix calls lockf and flock for file locking. These calls need to be moved to abstraction classes in qpid::sys so that porting work (in particular to windows) can replace the implementations without having to refactor top-level broker code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (QPID-1148) c++ broker: need abstraction layer for
flock and lockf posix calls.
Posted by "Alan Conway (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alan Conway updated QPID-1148:
------------------------------
Attachment: makefile_am.diff
Those patches look good to me, built & tested fine on fedora 9. With the attached Makefile.am patch they can be committed now.
> c++ broker: need abstraction layer for flock and lockf posix calls.
> -------------------------------------------------------------------
>
> Key: QPID-1148
> URL: https://issues.apache.org/jira/browse/QPID-1148
> Project: Qpid
> Issue Type: Bug
> Components: C++ Broker
> Reporter: Alan Conway
> Assignee: Alan Conway
> Attachments: filesysdir.diff, lockfile.diff, makefile_am.diff
>
>
> The broker code uses posix calls lockf and flock for file locking. These calls need to be moved to abstraction classes in qpid::sys so that porting work (in particular to windows) can replace the implementations without having to refactor top-level broker code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (QPID-1148) c++ broker: need abstraction layer for
flock and lockf posix calls.
Posted by "Alan Conway (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alan Conway updated QPID-1148:
------------------------------
Comment: was deleted
> c++ broker: need abstraction layer for flock and lockf posix calls.
> -------------------------------------------------------------------
>
> Key: QPID-1148
> URL: https://issues.apache.org/jira/browse/QPID-1148
> Project: Qpid
> Issue Type: Bug
> Components: C++ Broker
> Reporter: Alan Conway
> Assignee: Alan Conway
> Attachments: filesysdir.diff, lockfile.diff
>
>
> The broker code uses posix calls lockf and flock for file locking. These calls need to be moved to abstraction classes in qpid::sys so that porting work (in particular to windows) can replace the implementations without having to refactor top-level broker code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (QPID-1148) c++ broker: need abstraction layer
for flock and lockf posix calls.
Posted by "Manuel Teira (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608337#action_12608337 ]
Manuel Teira commented on QPID-1148:
------------------------------------
I've hit a related issue after changes in r671604: use flock to lock data dir rather than a lock file. Since the flock interface is only supported in Solaris as a compatibility interface, and is frightnening foolish users with multithread pain and sorrow, the lockf interface would be preferred, but that abstraction on an qpid::sys class would be even better.
Is there somebody working on this, or should I dare to implement it?
> c++ broker: need abstraction layer for flock and lockf posix calls.
> -------------------------------------------------------------------
>
> Key: QPID-1148
> URL: https://issues.apache.org/jira/browse/QPID-1148
> Project: Qpid
> Issue Type: Bug
> Components: C++ Broker
> Reporter: Alan Conway
> Assignee: Alan Conway
>
> The broker code uses posix calls lockf and flock for file locking. These calls need to be moved to abstraction classes in qpid::sys so that porting work (in particular to windows) can replace the implementations without having to refactor top-level broker code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (QPID-1148) c++ broker: need abstraction layer for
flock and lockf posix calls.
Posted by "Steve Huston (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Huston updated QPID-1148:
-------------------------------
Attachment: filesysdir.diff
The filesysdir.diff file adds another set of files to add the FileSysDir class - it's used to portably test existence of, and create, a directory. DataDir is changed to make use of it.
> c++ broker: need abstraction layer for flock and lockf posix calls.
> -------------------------------------------------------------------
>
> Key: QPID-1148
> URL: https://issues.apache.org/jira/browse/QPID-1148
> Project: Qpid
> Issue Type: Bug
> Components: C++ Broker
> Reporter: Alan Conway
> Assignee: Alan Conway
> Attachments: filesysdir.diff, lockfile.diff
>
>
> The broker code uses posix calls lockf and flock for file locking. These calls need to be moved to abstraction classes in qpid::sys so that porting work (in particular to windows) can replace the implementations without having to refactor top-level broker code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.