[
https://issues.apache.org/jira/browse/ARTEMIS-5110?focusedWorklogId=939535&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-939535
]
ASF GitHub Bot logged work on ARTEMIS-5110:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 22/Oct/24 16:09
Start Date: 22/Oct/24 16:09
Worklog Time Spent: 10m
Work Description: gemmellr commented on code in PR #5303:
URL: https://github.com/apache/activemq-artemis/pull/5303#discussion_r1811017624
##########
artemis-log-annotation-processor/src/main/java/org/apache/activemq/artemis/logs/annotation/processor/LogAnnotationProcessor.java:
##########
@@ -204,6 +208,17 @@ void validateRegexID(LogBundle bundleAnnotation, long id) {
}
}
+ void checkRetiredIDs(LogBundle bundleAnnotation, long id) {
+ if (bundleAnnotation.retiredIDs() != null &&
!bundleAnnotation.retiredIDs().isEmpty()) {
+ if (Arrays.stream(bundleAnnotation.retiredIDs().split(","))
+ .map(String::trim)
+ .map(Long::valueOf)
+ .collect(Collectors.toList()).contains(id)) {
+ throw new IllegalArgumentException("Code ID " + id + " has been
retired. Select a different ID.");
+ }
+ }
+ }
Review Comment:
The 'dont create repeatedly' aspect looks better, however it still doesn't
do anything to indicate about the IDs it knows you cant use, which would
prevent the very likely 'just try using next ID...find it is also retired'
gotcha.
Issue Time Tracking
-------------------
Worklog Id: (was: 939535)
Time Spent: 1h 40m (was: 1.5h)
> Add ability to identify retired IDs in log annotations
> ------------------------------------------------------
>
> Key: ARTEMIS-5110
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5110
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Reporter: Justin Bertram
> Assignee: Justin Bertram
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> The broker uses unique IDs for logging statements. As logging changes over
> time we need a way to "retire" these IDs (e.g. when certain logging
> statements are no longer needed) to ensure they are not used again in the
> future (or perhaps put back into the rotation after a certain amount of time).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact