[GitHub] activemq-artemis pull request #2010: ARTEMIS-1801 removing null-unchecked de...

2018-04-11 Thread stanlyDoge
Github user stanlyDoge commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2010#discussion_r180971622
  
--- Diff: 
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
 ---
@@ -511,22 +511,24 @@ public void close() {
public void transferConnection(final CoreRemotingConnection 
newConnection) {
   // Needs to synchronize on the connection to make sure no packets 
from
   // the old connection get processed after transfer has occurred
-  synchronized (connection.getTransferLock()) {
- connection.removeChannel(id);
+  if (connection != null) {
--- End diff --

Well, it is null-checked few lines bellow so it confued me.


---


[GitHub] activemq-artemis issue #2011: ARTEMIS-1740: Add support for regex based cert...

2018-04-11 Thread jbertram
Github user jbertram commented on the issue:

https://github.com/apache/activemq-artemis/pull/2011
  
This looks good except for a few things:

- I would rather not have an additional file for the regex properties. I 
think it would be better to instead denote the regex in the normal user 
properties file using the traditional forward slashes (as described in the 
JIRA).
- There's no documentation. The new functionality should be documented in 
docs/user-manual/en/security.md.
- I'd like to see an integration test added to 
{{org.apache.activemq.artemis.tests.integration.security.SecurityTest}}. 
There's several tests in there already which test cert-based login.


---


[GitHub] activemq-artemis pull request #2010: ARTEMIS-1801 removing null-unchecked de...

2018-04-11 Thread clebertsuconic
Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2010#discussion_r180859972
  
--- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
 ---
@@ -2727,7 +2731,7 @@ private Message makeCopy(final MessageReference ref,
   Message copy = message.copy(newID);
 
   if (copyOriginalHeaders) {
- copy.referenceOriginalMessage(message, ref != null ? 
ref.getQueue().getName().toString() : null);
+ copy.referenceOriginalMessage(message, 
ref.getQueue().getName().toString());
--- End diff --

keep it ! :) nice one!


---


[GitHub] activemq-artemis pull request #2010: ARTEMIS-1801 removing null-unchecked de...

2018-04-11 Thread clebertsuconic
Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2010#discussion_r180859106
  
--- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java
 ---
@@ -205,7 +205,7 @@ public PageSubscriptionCounter getCounter() {
 */
@Override
public boolean reloadPageCompletion(PagePosition position) throws 
Exception {
-  if (!pageStore.checkPageFileExists((int)position.getPageNr())) {
+  if (pageStore != null && 
!pageStore.checkPageFileExists((int)position.getPageNr())) {
--- End diff --

pageStore is final.. it will never be null


---


[GitHub] activemq-artemis pull request #2010: ARTEMIS-1801 removing null-unchecked de...

2018-04-11 Thread clebertsuconic
Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2010#discussion_r180859389
  
--- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
 ---
@@ -2712,6 +2712,10 @@ private Message makeCopy(final MessageReference ref, 
final boolean expiry) throw
private Message makeCopy(final MessageReference ref,
 final boolean expiry,
 final boolean copyOriginalHeaders) throws 
Exception {
+  if (ref == null) {
+ return null;
--- End diff --

I would actually throw an Exception.. you're not supposed to make a copy of 
a ref == null.

it's a valid assertion, but I would actually make it throw 
NullPointerException  here. (Or a chosen exception).


---


[GitHub] activemq-artemis pull request #2010: ARTEMIS-1801 removing null-unchecked de...

2018-04-11 Thread clebertsuconic
Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2010#discussion_r180858486
  
--- Diff: 
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
 ---
@@ -511,22 +511,24 @@ public void close() {
public void transferConnection(final CoreRemotingConnection 
newConnection) {
   // Needs to synchronize on the connection to make sure no packets 
from
   // the old connection get processed after transfer has occurred
-  synchronized (connection.getTransferLock()) {
- connection.removeChannel(id);
+  if (connection != null) {
--- End diff --

same thing here.. how connection would be null?


---


[GitHub] activemq-artemis pull request #2010: ARTEMIS-1801 removing null-unchecked de...

2018-04-11 Thread clebertsuconic
Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2010#discussion_r180858361
  
--- Diff: 
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
 ---
@@ -380,7 +380,7 @@ public Packet sendBlocking(final Packet packet,
 
 connection.getTransportConnection().write(buffer, false, 
false);
 
-long toWait = connection.getBlockingCallTimeout();
--- End diff --

Looking at the code, I can't see how connection will ever be null here..  I 
think you should remove this one...

For instance... the very same connection was used before within a lock.. 
what would issue a NPE a lot earlier than here.

I don't see how connection could ever be null.


---


[GitHub] activemq-artemis pull request #1999: ARTEMIS-1790 Improve Topology Member Fi...

2018-04-11 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/activemq-artemis/pull/1999


---


[GitHub] activemq-artemis issue #2011: ARTEMIS-1740: Add support for regex based cert...

2018-04-11 Thread clebertsuconic
Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/2011
  
@jbertram can you look into this one? you have more miles on security than 
I do. :) 


---


Re: [HEADS-UP] 2.5.1 in one week

2018-04-11 Thread Clebert Suconic
I got side tracked into something else (personal) and couldn't do it
earlier.. sorry about that.

I can do a release (2.5.1) next week. We can later do a 2.5.2 about
mid may. How that sounds?

On Tue, Apr 10, 2018 at 7:37 PM, pwjenkins
 wrote:
> I have been watching for the 2.5.1 release to be announced. Does the release
> have a date yet? It looks like before April 20th is reasonable to plan for.
> Is that accurate?
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html



-- 
Clebert Suconic


Re: Board report for April 2018

2018-04-11 Thread Bruce Snyder
Thanks, Chris. I am only reporting about the 5.15.3 release for ActiveMQ.

Bruce

On Wed, Apr 11, 2018 at 11:57 AM, Christopher Shannon <
christopher.l.shan...@gmail.com> wrote:

> There really hasn't been any activity other than the 5.15.3 update and
> a couple of minor bug fixes.  There's no new development going on in
> terms of features.
>
> On Wed, Apr 11, 2018 at 11:19 AM, Bruce Snyder 
> wrote:
> > There have been no contributions to the board report around the activity
> on
> > ActiveMQ itself. Can someone please provide me three points to include in
> > the report that are specific to ActiveMQ activity before I submit it
> today?
> >
> > Bruce
> >
> > On Tue, Apr 10, 2018 at 1:54 PM, Bruce Snyder 
> > wrote:
> >
> >> Thank you, Justin!
> >>
> >> Bruce
> >>
> >> On Tue, Apr 10, 2018 at 10:06 AM, Justin Bertram 
> >> wrote:
> >>
> >>> I added the Artemis 2.5.0 release including some highlighted features
> from
> >>> that release. I hope the level-of-detail was appropriate. Please
> adjust if
> >>> necessary. Thanks!
> >>>
> >>>
> >>> Justin
> >>>
> >>> On Tue, Apr 10, 2018 at 10:22 AM, Bruce Snyder  >
> >>> wrote:
> >>>
> >>> > I am getting rather desperate to have someone describe the project
> >>> activity
> >>> > for ActiveMQ, Artemis as well as NMS, CMS, etc.
> >>> >
> >>> > if you work on the project, can you please contribute to the April
> board
> >>> > report via the wiki?
> >>> >
> >>> > https://cwiki.apache.org/confluence/pages/viewpage.action?
> >>> pageId=75977784
> >>> >
> >>> > Your time is much appreciated. If I could buy you a virtual beer I
> >>> would do
> >>> > so ;-).
> >>> >
> >>> > Bruce
> >>> >
> >>> > On Tue, Apr 10, 2018 at 9:21 AM, Bruce Snyder <
> bruce.sny...@gmail.com>
> >>> > wrote:
> >>> >
> >>> > > Hi Michael,
> >>> > >
> >>> > > I have granted you r/w permissions to the wiki, so you should be
> able
> >>> to
> >>> > > edit the page now.
> >>> > >
> >>> > > Bruce
> >>> > >
> >>> > > On Mon, Apr 9, 2018 at 1:45 PM, Michael André Pearce <
> >>> > > michael.andre.pea...@me.com> wrote:
> >>> > >
> >>> > >> Hi Bruce,
> >>> > >>
> >>> > >> It seems same issue as last time, i don’t have rights to edit
> >>> directly.
> >>> > >>
> >>> > >> Can you check the space permissions for my user:
> michael.andre.pearce
> >>> > >>
> >>> > >>
> >>> > >> Bits i would add / comment on are:
> >>> > >>
> >>> > >> Artemis released 2.5.0
> >>> > >> Effort to create updated website continues but slowly, a webex was
> >>> had
> >>> > >> last month to try get more traction on this.
> >>> > >> A number of new contributors in Artemis who are not just one offs,
> >>> but
> >>> > >> continue to actively contribute, a sign of adoption increasing.
> >>> > >>
> >>> > >>
> >>> > >> Cheers
> >>> > >> Mike
> >>> > >>
> >>> > >>
> >>> > >> > On 9 Apr 2018, at 16:37, Bruce Snyder 
> >>> wrote:
> >>> > >> >
> >>> > >> > Happy Monday morning!
> >>> > >> >
> >>> > >> > The board report for April has not received any contributions
> yet
> >>> and
> >>> > I
> >>> > >> > must submit it by Wednesday, April 11th.
> >>> > >> >
> >>> > >> > The report needs information on project activity for the
> following
> >>> > three
> >>> > >> > categories:
> >>> > >> >
> >>> > >> > * ActiveMQ
> >>> > >> > * Artemis
> >>> > >> > * Other
> >>> > >> >
> >>> > >> > If you can contribute any information about the project
> development
> >>> > for
> >>> > >> > these three areas, can you please add it to the board report
> right
> >>> > away?
> >>> > >> >
> >>> > >> > Bruce
> >>> > >> >
> >>> > >> > On Wed, Apr 4, 2018 at 5:10 PM, Bruce Snyder <
> >>> bruce.sny...@gmail.com>
> >>> > >> wrote:
> >>> > >> >
> >>> > >> >> I am following up again to request your contribution to the ASF
> >>> board
> >>> > >> >> report for April. The deadline to contribute is April 11th.
> >>> > >> >>
> >>> > >> >> If you are contributing code to any modules within the ActiveMQ
> >>> > >> project,
> >>> > >> >> please take a few moments to edit the following wiki page to
> >>> report
> >>> > on
> >>> > >> the
> >>> > >> >> activity that has taken place over the last two months:
> >>> > >> >>
> >>> > >> >> https://cwiki.apache.org/confluence/pages/viewpage.action?
> >>> > >> pageId=75977784
> >>> > >> >>
> >>> > >> >> Thank you!
> >>> > >> >>
> >>> > >> >> Bruce
> >>> > >> >>
> >>> > >> >> On Thu, Mar 29, 2018 at 9:30 PM, Bruce Snyder <
> >>> > bruce.sny...@gmail.com>
> >>> > >> >> wrote:
> >>> > >> >>
> >>> > >> >>> It is time once again to submit a report to the ASF board for
> >>> April.
> >>> > >> >>> Please take 5 minutes to contribute some of the project
> activity
> >>> to
> >>> > >> the
> >>> > >> >>> report at the wiki page below:
> >>> > >> >>>
> >>> > >> >>> https://cwiki.apache.org/confluence/pages/viewpage.action?
> >>> > >> pageId=75977784
> >>> > >> >>>
> >>> > >> >>> This report must be submitted by April 11th.
> >>> > >> 

Re: Board report for April 2018

2018-04-11 Thread Christopher Shannon
There really hasn't been any activity other than the 5.15.3 update and
a couple of minor bug fixes.  There's no new development going on in
terms of features.

On Wed, Apr 11, 2018 at 11:19 AM, Bruce Snyder  wrote:
> There have been no contributions to the board report around the activity on
> ActiveMQ itself. Can someone please provide me three points to include in
> the report that are specific to ActiveMQ activity before I submit it today?
>
> Bruce
>
> On Tue, Apr 10, 2018 at 1:54 PM, Bruce Snyder 
> wrote:
>
>> Thank you, Justin!
>>
>> Bruce
>>
>> On Tue, Apr 10, 2018 at 10:06 AM, Justin Bertram 
>> wrote:
>>
>>> I added the Artemis 2.5.0 release including some highlighted features from
>>> that release. I hope the level-of-detail was appropriate. Please adjust if
>>> necessary. Thanks!
>>>
>>>
>>> Justin
>>>
>>> On Tue, Apr 10, 2018 at 10:22 AM, Bruce Snyder 
>>> wrote:
>>>
>>> > I am getting rather desperate to have someone describe the project
>>> activity
>>> > for ActiveMQ, Artemis as well as NMS, CMS, etc.
>>> >
>>> > if you work on the project, can you please contribute to the April board
>>> > report via the wiki?
>>> >
>>> > https://cwiki.apache.org/confluence/pages/viewpage.action?
>>> pageId=75977784
>>> >
>>> > Your time is much appreciated. If I could buy you a virtual beer I
>>> would do
>>> > so ;-).
>>> >
>>> > Bruce
>>> >
>>> > On Tue, Apr 10, 2018 at 9:21 AM, Bruce Snyder 
>>> > wrote:
>>> >
>>> > > Hi Michael,
>>> > >
>>> > > I have granted you r/w permissions to the wiki, so you should be able
>>> to
>>> > > edit the page now.
>>> > >
>>> > > Bruce
>>> > >
>>> > > On Mon, Apr 9, 2018 at 1:45 PM, Michael André Pearce <
>>> > > michael.andre.pea...@me.com> wrote:
>>> > >
>>> > >> Hi Bruce,
>>> > >>
>>> > >> It seems same issue as last time, i don’t have rights to edit
>>> directly.
>>> > >>
>>> > >> Can you check the space permissions for my user: michael.andre.pearce
>>> > >>
>>> > >>
>>> > >> Bits i would add / comment on are:
>>> > >>
>>> > >> Artemis released 2.5.0
>>> > >> Effort to create updated website continues but slowly, a webex was
>>> had
>>> > >> last month to try get more traction on this.
>>> > >> A number of new contributors in Artemis who are not just one offs,
>>> but
>>> > >> continue to actively contribute, a sign of adoption increasing.
>>> > >>
>>> > >>
>>> > >> Cheers
>>> > >> Mike
>>> > >>
>>> > >>
>>> > >> > On 9 Apr 2018, at 16:37, Bruce Snyder 
>>> wrote:
>>> > >> >
>>> > >> > Happy Monday morning!
>>> > >> >
>>> > >> > The board report for April has not received any contributions yet
>>> and
>>> > I
>>> > >> > must submit it by Wednesday, April 11th.
>>> > >> >
>>> > >> > The report needs information on project activity for the following
>>> > three
>>> > >> > categories:
>>> > >> >
>>> > >> > * ActiveMQ
>>> > >> > * Artemis
>>> > >> > * Other
>>> > >> >
>>> > >> > If you can contribute any information about the project development
>>> > for
>>> > >> > these three areas, can you please add it to the board report right
>>> > away?
>>> > >> >
>>> > >> > Bruce
>>> > >> >
>>> > >> > On Wed, Apr 4, 2018 at 5:10 PM, Bruce Snyder <
>>> bruce.sny...@gmail.com>
>>> > >> wrote:
>>> > >> >
>>> > >> >> I am following up again to request your contribution to the ASF
>>> board
>>> > >> >> report for April. The deadline to contribute is April 11th.
>>> > >> >>
>>> > >> >> If you are contributing code to any modules within the ActiveMQ
>>> > >> project,
>>> > >> >> please take a few moments to edit the following wiki page to
>>> report
>>> > on
>>> > >> the
>>> > >> >> activity that has taken place over the last two months:
>>> > >> >>
>>> > >> >> https://cwiki.apache.org/confluence/pages/viewpage.action?
>>> > >> pageId=75977784
>>> > >> >>
>>> > >> >> Thank you!
>>> > >> >>
>>> > >> >> Bruce
>>> > >> >>
>>> > >> >> On Thu, Mar 29, 2018 at 9:30 PM, Bruce Snyder <
>>> > bruce.sny...@gmail.com>
>>> > >> >> wrote:
>>> > >> >>
>>> > >> >>> It is time once again to submit a report to the ASF board for
>>> April.
>>> > >> >>> Please take 5 minutes to contribute some of the project activity
>>> to
>>> > >> the
>>> > >> >>> report at the wiki page below:
>>> > >> >>>
>>> > >> >>> https://cwiki.apache.org/confluence/pages/viewpage.action?
>>> > >> pageId=75977784
>>> > >> >>>
>>> > >> >>> This report must be submitted by April 11th.
>>> > >> >>>
>>> > >> >>> I really appreciate your contributions!
>>> > >> >>>
>>> > >> >>> Bruce
>>> > >> >>>
>>> > >> >>> --
>>> > >> >>> perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&
>>> > >> >>> 5R\"F)R=6-E+G-N>61E>> > >> >>>
>>> > >> >>> ActiveMQ in Action: http://bit.ly/2je6cQ
>>> > >> >>> Blog: http://bsnyder.org/ 
>>> > >> >>> Twitter: http://twitter.com/brucesnyder
>>> > >> >>>
>>> > >> >>
>>> > >> >>
>>> > >> >>
>>> > >> >> --
>>> > >> >> perl -e 'print 

Re: Board report for April 2018

2018-04-11 Thread Bruce Snyder
There have been no contributions to the board report around the activity on
ActiveMQ itself. Can someone please provide me three points to include in
the report that are specific to ActiveMQ activity before I submit it today?

Bruce

On Tue, Apr 10, 2018 at 1:54 PM, Bruce Snyder 
wrote:

> Thank you, Justin!
>
> Bruce
>
> On Tue, Apr 10, 2018 at 10:06 AM, Justin Bertram 
> wrote:
>
>> I added the Artemis 2.5.0 release including some highlighted features from
>> that release. I hope the level-of-detail was appropriate. Please adjust if
>> necessary. Thanks!
>>
>>
>> Justin
>>
>> On Tue, Apr 10, 2018 at 10:22 AM, Bruce Snyder 
>> wrote:
>>
>> > I am getting rather desperate to have someone describe the project
>> activity
>> > for ActiveMQ, Artemis as well as NMS, CMS, etc.
>> >
>> > if you work on the project, can you please contribute to the April board
>> > report via the wiki?
>> >
>> > https://cwiki.apache.org/confluence/pages/viewpage.action?
>> pageId=75977784
>> >
>> > Your time is much appreciated. If I could buy you a virtual beer I
>> would do
>> > so ;-).
>> >
>> > Bruce
>> >
>> > On Tue, Apr 10, 2018 at 9:21 AM, Bruce Snyder 
>> > wrote:
>> >
>> > > Hi Michael,
>> > >
>> > > I have granted you r/w permissions to the wiki, so you should be able
>> to
>> > > edit the page now.
>> > >
>> > > Bruce
>> > >
>> > > On Mon, Apr 9, 2018 at 1:45 PM, Michael André Pearce <
>> > > michael.andre.pea...@me.com> wrote:
>> > >
>> > >> Hi Bruce,
>> > >>
>> > >> It seems same issue as last time, i don’t have rights to edit
>> directly.
>> > >>
>> > >> Can you check the space permissions for my user: michael.andre.pearce
>> > >>
>> > >>
>> > >> Bits i would add / comment on are:
>> > >>
>> > >> Artemis released 2.5.0
>> > >> Effort to create updated website continues but slowly, a webex was
>> had
>> > >> last month to try get more traction on this.
>> > >> A number of new contributors in Artemis who are not just one offs,
>> but
>> > >> continue to actively contribute, a sign of adoption increasing.
>> > >>
>> > >>
>> > >> Cheers
>> > >> Mike
>> > >>
>> > >>
>> > >> > On 9 Apr 2018, at 16:37, Bruce Snyder 
>> wrote:
>> > >> >
>> > >> > Happy Monday morning!
>> > >> >
>> > >> > The board report for April has not received any contributions yet
>> and
>> > I
>> > >> > must submit it by Wednesday, April 11th.
>> > >> >
>> > >> > The report needs information on project activity for the following
>> > three
>> > >> > categories:
>> > >> >
>> > >> > * ActiveMQ
>> > >> > * Artemis
>> > >> > * Other
>> > >> >
>> > >> > If you can contribute any information about the project development
>> > for
>> > >> > these three areas, can you please add it to the board report right
>> > away?
>> > >> >
>> > >> > Bruce
>> > >> >
>> > >> > On Wed, Apr 4, 2018 at 5:10 PM, Bruce Snyder <
>> bruce.sny...@gmail.com>
>> > >> wrote:
>> > >> >
>> > >> >> I am following up again to request your contribution to the ASF
>> board
>> > >> >> report for April. The deadline to contribute is April 11th.
>> > >> >>
>> > >> >> If you are contributing code to any modules within the ActiveMQ
>> > >> project,
>> > >> >> please take a few moments to edit the following wiki page to
>> report
>> > on
>> > >> the
>> > >> >> activity that has taken place over the last two months:
>> > >> >>
>> > >> >> https://cwiki.apache.org/confluence/pages/viewpage.action?
>> > >> pageId=75977784
>> > >> >>
>> > >> >> Thank you!
>> > >> >>
>> > >> >> Bruce
>> > >> >>
>> > >> >> On Thu, Mar 29, 2018 at 9:30 PM, Bruce Snyder <
>> > bruce.sny...@gmail.com>
>> > >> >> wrote:
>> > >> >>
>> > >> >>> It is time once again to submit a report to the ASF board for
>> April.
>> > >> >>> Please take 5 minutes to contribute some of the project activity
>> to
>> > >> the
>> > >> >>> report at the wiki page below:
>> > >> >>>
>> > >> >>> https://cwiki.apache.org/confluence/pages/viewpage.action?
>> > >> pageId=75977784
>> > >> >>>
>> > >> >>> This report must be submitted by April 11th.
>> > >> >>>
>> > >> >>> I really appreciate your contributions!
>> > >> >>>
>> > >> >>> Bruce
>> > >> >>>
>> > >> >>> --
>> > >> >>> perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&
>> > >> >>> 5R\"F)R=6-E+G-N>61E> > >> >>>
>> > >> >>> ActiveMQ in Action: http://bit.ly/2je6cQ
>> > >> >>> Blog: http://bsnyder.org/ 
>> > >> >>> Twitter: http://twitter.com/brucesnyder
>> > >> >>>
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >> --
>> > >> >> perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&
>> > >> >> 5R\"F)R=6-E+G-N>61E> > >> >>
>> > >> >> ActiveMQ in Action: http://bit.ly/2je6cQ
>> > >> >> Blog: http://bsnyder.org/ 
>> > >> >> Twitter: http://twitter.com/brucesnyder
>> > >> >>
>> > >> >
>> > >> >
>> > >> >
>> > >> > --
>> > >> > perl -e 'print
>> > >> > 

[GitHub] activemq-artemis pull request #2009: ARTEMIS-1800 - Fix metrics decrement on...

2018-04-11 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/activemq-artemis/pull/2009


---


[GitHub] activemq-artemis pull request #2009: ARTEMIS-1800 - Fix metrics decrement on...

2018-04-11 Thread clebertsuconic
Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2009#discussion_r180777030
  
--- Diff: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
 ---
@@ -2510,6 +2510,39 @@ public void testSendMessage() throws Exception {
   Assert.assertEquals(new String(body), "theBody");
}
 
+   @Test
+   public void testGetScheduledCountOnRemove() throws Exception {
+  long delay = Integer.MAX_VALUE;
+  SimpleString address = RandomUtil.randomSimpleString();
+  SimpleString queue = RandomUtil.randomSimpleString();
+
+  session.createQueue(address, RoutingType.MULTICAST, queue, null, 
durable);
+
+  QueueControl queueControl = createManagementControl(address, queue);
+  Assert.assertEquals(0, queueControl.getScheduledCount());
+
+  Field queueMemorySizeField = 
QueueImpl.class.getDeclaredField("queueMemorySize");
+  queueMemorySizeField.setAccessible(true);
+  final LocalQueueBinding binding = (LocalQueueBinding) 
server.getPostOffice().getBinding(queue);
+  Queue q = binding.getQueue();
+  AtomicInteger queueMemorySize1 = (AtomicInteger) 
queueMemorySizeField.get(q);
+  assertTrue(queueMemorySize1.get() == 0);
+
+  ClientProducer producer = session.createProducer(address);
+  ClientMessage message = session.createMessage(durable);
+  message.putLongProperty(Message.HDR_SCHEDULED_DELIVERY_TIME, 
System.currentTimeMillis() + delay);
+  producer.send(message);
+
+  queueControl.removeAllMessages();
+
+  Assert.assertEquals(0, queueControl.getMessageCount());
--- End diff --

ok.. I will just merge it


---


[GitHub] activemq-artemis pull request #2009: ARTEMIS-1800 - Fix metrics decrement on...

2018-04-11 Thread cshannon
Github user cshannon commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2009#discussion_r180774964
  
--- Diff: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
 ---
@@ -2510,6 +2510,39 @@ public void testSendMessage() throws Exception {
   Assert.assertEquals(new String(body), "theBody");
}
 
+   @Test
+   public void testGetScheduledCountOnRemove() throws Exception {
+  long delay = Integer.MAX_VALUE;
+  SimpleString address = RandomUtil.randomSimpleString();
+  SimpleString queue = RandomUtil.randomSimpleString();
+
+  session.createQueue(address, RoutingType.MULTICAST, queue, null, 
durable);
+
+  QueueControl queueControl = createManagementControl(address, queue);
+  Assert.assertEquals(0, queueControl.getScheduledCount());
+
+  Field queueMemorySizeField = 
QueueImpl.class.getDeclaredField("queueMemorySize");
+  queueMemorySizeField.setAccessible(true);
+  final LocalQueueBinding binding = (LocalQueueBinding) 
server.getPostOffice().getBinding(queue);
+  Queue q = binding.getQueue();
+  AtomicInteger queueMemorySize1 = (AtomicInteger) 
queueMemorySizeField.get(q);
+  assertTrue(queueMemorySize1.get() == 0);
+
+  ClientProducer producer = session.createProducer(address);
+  ClientMessage message = session.createMessage(durable);
+  message.putLongProperty(Message.HDR_SCHEDULED_DELIVERY_TIME, 
System.currentTimeMillis() + delay);
+  producer.send(message);
+
+  queueControl.removeAllMessages();
+
+  Assert.assertEquals(0, queueControl.getMessageCount());
--- End diff --

I think the removeAllMessages() call is synchronous but if it's an issue 
it's easy enough to switch out the assertion in the test


---


[GitHub] activemq-artemis pull request #2009: ARTEMIS-1800 - Fix metrics decrement on...

2018-04-11 Thread clebertsuconic
Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2009#discussion_r180773234
  
--- Diff: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
 ---
@@ -2510,6 +2510,39 @@ public void testSendMessage() throws Exception {
   Assert.assertEquals(new String(body), "theBody");
}
 
+   @Test
+   public void testGetScheduledCountOnRemove() throws Exception {
+  long delay = Integer.MAX_VALUE;
+  SimpleString address = RandomUtil.randomSimpleString();
+  SimpleString queue = RandomUtil.randomSimpleString();
+
+  session.createQueue(address, RoutingType.MULTICAST, queue, null, 
durable);
+
+  QueueControl queueControl = createManagementControl(address, queue);
+  Assert.assertEquals(0, queueControl.getScheduledCount());
+
+  Field queueMemorySizeField = 
QueueImpl.class.getDeclaredField("queueMemorySize");
+  queueMemorySizeField.setAccessible(true);
+  final LocalQueueBinding binding = (LocalQueueBinding) 
server.getPostOffice().getBinding(queue);
+  Queue q = binding.getQueue();
+  AtomicInteger queueMemorySize1 = (AtomicInteger) 
queueMemorySizeField.get(q);
+  assertTrue(queueMemorySize1.get() == 0);
+
+  ClientProducer producer = session.createProducer(address);
+  ClientMessage message = session.createMessage(durable);
+  message.putLongProperty(Message.HDR_SCHEDULED_DELIVERY_TIME, 
System.currentTimeMillis() + delay);
+  producer.send(message);
+
+  queueControl.removeAllMessages();
+
+  Assert.assertEquals(0, queueControl.getMessageCount());
--- End diff --

in a lot of cases, I have had to change this to:

Wait.assertEquals(0, queueuControl::getMessageCount);


Are you sure this is reliable, non asynchronous?


---


Re: [HEADS-UP] 2.5.1 in one week

2018-04-11 Thread pwjenkins
I have been watching for the 2.5.1 release to be announced. Does the release
have a date yet? It looks like before April 20th is reasonable to plan for.
Is that accurate?



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html


[GitHub] activemq-artemis pull request #2010: ARTEMIS-1801 removing null-unchecked de...

2018-04-11 Thread stanlyDoge
Github user stanlyDoge commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2010#discussion_r180654379
  
--- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
 ---
@@ -2769,7 +2769,7 @@ public Queue createQueue(final AddressInfo addrInfo,
  throw 
ActiveMQMessageBundle.BUNDLE.invalidRoutingTypeForAddress(rt, 
info.getName().toString(), info.getRoutingTypes());
   }
 
-  final QueueConfig queueConfig = 
queueConfigBuilder.filter(filter).pagingManager(pagingManager).user(user).durable(durable).temporary(temporary).autoCreated(autoCreated).routingType(addrInfo.getRoutingType()).maxConsumers(maxConsumers).purgeOnNoConsumers(purgeOnNoConsumers).exclusive(exclusive).lastValue(lastValue).build();
+  final QueueConfig queueConfig = 
queueConfigBuilder.filter(filter).pagingManager(pagingManager).user(user).durable(durable).temporary(temporary).autoCreated(autoCreated).routingType(addrInfo
 == null ? RoutingType.ANYCAST 
:addrInfo.getRoutingType()).maxConsumers(maxConsumers).purgeOnNoConsumers(purgeOnNoConsumers).exclusive(exclusive).lastValue(lastValue).build();
--- End diff --

@jdanekrh Good catch!


---


[GitHub] activemq-artemis pull request #2010: ARTEMIS-1801 removing null-unchecked de...

2018-04-11 Thread jdanekrh
Github user jdanekrh commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2010#discussion_r180652792
  
--- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
 ---
@@ -2769,7 +2769,7 @@ public Queue createQueue(final AddressInfo addrInfo,
  throw 
ActiveMQMessageBundle.BUNDLE.invalidRoutingTypeForAddress(rt, 
info.getName().toString(), info.getRoutingTypes());
   }
 
-  final QueueConfig queueConfig = 
queueConfigBuilder.filter(filter).pagingManager(pagingManager).user(user).durable(durable).temporary(temporary).autoCreated(autoCreated).routingType(addrInfo.getRoutingType()).maxConsumers(maxConsumers).purgeOnNoConsumers(purgeOnNoConsumers).exclusive(exclusive).lastValue(lastValue).build();
+  final QueueConfig queueConfig = 
queueConfigBuilder.filter(filter).pagingManager(pagingManager).user(user).durable(durable).temporary(temporary).autoCreated(autoCreated).routingType(addrInfo
 == null ? RoutingType.ANYCAST 
:addrInfo.getRoutingType()).maxConsumers(maxConsumers).purgeOnNoConsumers(purgeOnNoConsumers).exclusive(exclusive).lastValue(lastValue).build();
--- End diff --

About 20 lines above this one is

RoutingType rt = (routingType == null ? 
ActiveMQDefaultConfiguration.getDefaultRoutingType() : routingType);


[here](https://github.com/apache/activemq-artemis/blob/fa3e37fdb91c285bcfe87cab3d771dfe80019e18/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java#L2754)
 and 
[here](https://github.com/apache/activemq-artemis/blob/fa3e37fdb91c285bcfe87cab3d771dfe80019e18/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java#L2865)

So maybe that one?


---


[GitHub] activemq-artemis pull request #2011: ARTEMIS-1740: Add support for regex bas...

2018-04-11 Thread LionelCons
GitHub user LionelCons opened a pull request:

https://github.com/apache/activemq-artemis/pull/2011

ARTEMIS-1740: Add support for regex based certificate authentication

This adds the possibility to have an optional properties file containing 
regular expressions to match against the DN.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/LionelCons/activemq-artemis artemis_1740

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/activemq-artemis/pull/2011.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2011


commit e8fc4975f5a758ee7204f89d1649cc326bcd5085
Author: Lionel Cons 
Date:   2018-04-11T06:59:24Z

ARTEMIS-1740: Add support for regex based certificate authentication




---


[GitHub] activemq-artemis pull request #2010: ARTEMIS-1801 removing null-unchecked de...

2018-04-11 Thread stanlyDoge
Github user stanlyDoge commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2010#discussion_r180649567
  
--- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
 ---
@@ -2769,7 +2769,7 @@ public Queue createQueue(final AddressInfo addrInfo,
  throw 
ActiveMQMessageBundle.BUNDLE.invalidRoutingTypeForAddress(rt, 
info.getName().toString(), info.getRoutingTypes());
   }
 
-  final QueueConfig queueConfig = 
queueConfigBuilder.filter(filter).pagingManager(pagingManager).user(user).durable(durable).temporary(temporary).autoCreated(autoCreated).routingType(addrInfo.getRoutingType()).maxConsumers(maxConsumers).purgeOnNoConsumers(purgeOnNoConsumers).exclusive(exclusive).lastValue(lastValue).build();
+  final QueueConfig queueConfig = 
queueConfigBuilder.filter(filter).pagingManager(pagingManager).user(user).durable(durable).temporary(temporary).autoCreated(autoCreated).routingType(addrInfo
 == null ? RoutingType.ANYCAST 
:addrInfo.getRoutingType()).maxConsumers(maxConsumers).purgeOnNoConsumers(purgeOnNoConsumers).exclusive(exclusive).lastValue(lastValue).build();
--- End diff --

What should be default routing type?


---


[GitHub] activemq-artemis pull request #2010: ARTEMIS-1801 removing null-unchecked de...

2018-04-11 Thread stanlyDoge
GitHub user stanlyDoge opened a pull request:

https://github.com/apache/activemq-artemis/pull/2010

ARTEMIS-1801 removing null-unchecked dereferences

There were some cases where value was checked for null and later directly 
dereferenced without check. I added checks. I am not sure about "default 
behaviour" tho. Can anybody check?

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/stanlyDoge/activemq-artemis ARTEMIS-1801

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/activemq-artemis/pull/2010.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2010


commit 8f393828473c75321b28a4fe63f5f08fb7006bbe
Author: Stanislav Knot 
Date:   2018-04-11T06:43:07Z

ARTEMIS-1801 removing null-unchecked dereferences




---