qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Ross (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Commented: (QPID-1214) Requirement to be able to purge the top item or top n items from a queue.
Date Mon, 04 Aug 2008 19:16:44 GMT

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

Ted Ross commented on QPID-1214:


This patch looks pretty good.  I have a couple of minor, and mostly cosmetic, comments I'll
make for one last go around.

1) The Qpid C++ coding convention calls for 4-space indentation with no tab characters.  Please
don't submit patches that introduce tab characters.  (I concede that the one file: SessionAdapter.cpp
was filled with tabs before you got to it).

2) I recommend using a default value for the argument on Queue::purge (in Queue.h) such that
calls to Queue::purge() remove all messages from the queue.  This ensures that the meaning
of the method is unchanged for existing users and no changes to SessionAdapter are needed.

3) The "if" clause in the following code fragment (Queue::purge) doesn't do anything and should
be removed:

+    unsigned long purge_count = 0;
+    if (purge_request) 
+    {
+      purge_count = purge_request;
+    }

4) In the same routine, there is mixed use of "uint32_t" and "unsigned long".  I suggest using
uint32_t in all cases.  Also (again, pre-existing), the return value is uint32_t, but the
count that is returned is an int.

5) In the schema, the method argument is called "request".  This is pretty nondescript.  Can
we call it "count" (or something similar) and provide a desc="" text to describe its use?


> Requirement to be able to purge the top item or top n items from a queue. 
> --------------------------------------------------------------------------
>                 Key: QPID-1214
>                 URL: https://issues.apache.org/jira/browse/QPID-1214
>             Project: Qpid
>          Issue Type: New Feature
>          Components: C++ Broker, Python Test Suite
>            Reporter: William Henry
>            Assignee: Ted Ross
>         Attachments: purgefeature.diff
>   Original Estimate: 0h
>  Remaining Estimate: 0h
> This was originally the requirement to unblock a queue.  However after first implemented
it seemed better to modify purge, which purges all, to purge just the top message or the top
n messages.
> I want to at a test so that this gets tested on make check.  (Currently there is not
a check for the purge at all).

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

View raw message