You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "dlmarion (via GitHub)" <gi...@apache.org> on 2026/05/15 21:23:32 UTC

[PR] Added msg count endpoint and badge [accumulo]

dlmarion opened a new pull request, #6373:
URL: https://github.com/apache/accumulo/pull/6373

   Adds a badge containing the count of critical or
   high messages to the Messages link in the NavBar.
   If the number of critical messages is > 0, then the
   badge is red with the number of critical messages.
   Otherwise, if there are high messages, then the
   badge is yellow with the number of those messages.
   
   Added an API endpoint to return the underlying counts
   which does not use the same query parameters that are
   used with the switches. This means that counts will reflect
   messages that may not be seen on the messages page
   if the user has a switch turned off. This will allow for users
   to be notified that there are messages that they might not
   be seeing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Added msg count endpoint and badge [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on PR #6373:
URL: https://github.com/apache/accumulo/pull/6373#issuecomment-4480573379

   > It seems like it would be simpler and also avoid any unintentional drift to just use the size of the existing messages collection instead of maintaining a separate count. Is there a reason you have avoided doing that so far?
   
   The separate count is so that a different color can be used for higher priority messages.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Added msg count endpoint and badge [accumulo]

Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on PR #6373:
URL: https://github.com/apache/accumulo/pull/6373#issuecomment-4480490093

   It seems like it would  be simpler and also avoid any unintentional drift to just use the size of the existing messages collection instead of maintaining a separate count. Is there a reason you have avoided doing that so far?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Added msg count endpoint and badge [accumulo]

Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on PR #6373:
URL: https://github.com/apache/accumulo/pull/6373#issuecomment-4480657862

   > > It seems like it would be simpler and also avoid any unintentional drift to just use the size of the existing messages collection instead of maintaining a separate count. Is there a reason you have avoided doing that so far?
   > 
   > The separate count is so that a different color can be used for higher priority messages. 
   
   Yea I think its good to have the separate endpoint and be able to show the counts but I think we should be able to compute the count per `MessagePriority` when serving the endpoint right?
   
   > Regarding the drift, are you seeing that the counts would not be accurate?
   
   I think it would probably be fine but since `messages` is a set, if we `addMessage()` or `removeMessage()` with a duplicate message or a message that does not exist its possible for the new counter could be incremented (or not) out of sync with the set. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Added msg count endpoint and badge [accumulo]

Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on PR #6373:
URL: https://github.com/apache/accumulo/pull/6373#issuecomment-4480593319

   Something else that I just thought of is if there might be a better name instead of "Messages" here. To me that reads almost as human-to-human messaging. Two alternatives I could think of are "Notifications" and "Alerts". I think alerts fits the best since notifications seems like pieces of information that tracks whether a user has seen them or not which is not the case here.
   
   Curious the hear others opinion/ideas on this. Also not certain this should be handled in this PR or another.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Added msg count endpoint and badge [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on PR #6373:
URL: https://github.com/apache/accumulo/pull/6373#issuecomment-4463759918

   Screen shots:
   
   <img width="431" height="48" alt="crit-msg-count" src="https://github.com/user-attachments/assets/c5e2bec0-7992-452c-91ef-33cf6c7e2815" />
   
   <img width="426" height="53" alt="high-msg-count" src="https://github.com/user-attachments/assets/85731a69-b032-449a-b283-a9c686d147e2" />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Added msg count endpoint and badge [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on PR #6373:
URL: https://github.com/apache/accumulo/pull/6373#issuecomment-4480766448

   > > > It seems like it would be simpler and also avoid any unintentional drift to just use the size of the existing messages collection instead of maintaining a separate count. Is there a reason you have avoided doing that so far?
   > > 
   > > 
   > > The separate count is so that a different color can be used for higher priority messages.
   > 
   > Yea I think its good to have the separate endpoint and be able to show the counts but I think we should be able to compute the count per `MessagePriority` when serving the endpoint right?
   >
   
   Why compute it N times when you could compute it once?
   
   > > Regarding the drift, are you seeing that the counts would not be accurate?
   > 
   > I think it would probably be fine but since `messages` is a set, if we `addMessage()` or `removeMessage()` with a duplicate message or a message that does not exist its possible for the new counter could be incremented (or not) out of sync with the set.
   
   That's a good observation, I think I can handle the duplicates easily.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Added msg count endpoint and badge [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on PR #6373:
URL: https://github.com/apache/accumulo/pull/6373#issuecomment-4487577545

   I moved the message count computation to a single method that is called last in the `finish` method. This should make the counts accurate.
   
   > Something else that I just thought of is if there might be a better name instead of "Messages" here. To me that reads almost as human-to-human messaging. Two alternatives I could think of are "Notifications" and "Alerts". I think alerts fits the best since notifications seems like pieces of information that tracks whether a user has seen them or not which is not the case here.
   
   I have no issue renaming `Messages` to `Alerts`. I can do that in a follow-on PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Added msg count endpoint and badge [accumulo]

Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on PR #6373:
URL: https://github.com/apache/accumulo/pull/6373#issuecomment-4480816603

   > Why compute it N times when you could compute it once?
   
   Yea thats fair. Thats the tradeoff i guess. It would be an O(n) operation each time on a relatively small set which should be cheap right? It just depends if we think that cost is worth it for simpler logic pulling from a single source or truth.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Added msg count endpoint and badge [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on PR #6373:
URL: https://github.com/apache/accumulo/pull/6373#issuecomment-4491930577

   Created #6380 to rename Messages to Alerts


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Added msg count endpoint and badge [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion merged PR #6373:
URL: https://github.com/apache/accumulo/pull/6373


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org