New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed infinit tell failure #10111
fixed infinit tell failure #10111
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have proof in the form of a unit test.
newOrderedMsgList.add(pair); | ||
var oldValue = pair.getMsg().getValue(); | ||
if (StringUtils.isNotEmpty(oldValue.getFailureMessage())) { | ||
var newValue = TransportProtos.ToRuleEngineMsg.newBuilder() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var newValue = TransportProtos.ToRuleEngineMsg.newBuilder(oldValue).clearFailureMessage().build();
@@ -51,7 +52,18 @@ public void update(ConcurrentMap<UUID, TbProtoQueueMsg<TransportProtos.ToRuleEng | |||
List<IdMsgPair<TransportProtos.ToRuleEngineMsg>> newOrderedMsgList = new ArrayList<>(reprocessMap.size()); | |||
for (IdMsgPair<TransportProtos.ToRuleEngineMsg> pair : orderedMsgList) { | |||
if (reprocessMap.containsKey(pair.uuid)) { | |||
newOrderedMsgList.add(pair); | |||
var oldValue = pair.getMsg().getValue(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oldValue needs to sound better to me. All around are values. I would like to have a descriptive variable name.
like oldRuleEngineMsg
or any similar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Please consult with @ashvayka on the side effects possible.
if (StringUtils.isNotEmpty(pair.getMsg().getValue().getFailureMessage())) { | ||
var toRuleEngineMsg = TransportProtos.ToRuleEngineMsg.newBuilder(pair.getMsg().getValue()) | ||
.clearFailureMessage() | ||
.clearRelationTypes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TY. That is much more descriptive than before! failures and relations will be cleared.
Pull Request description
Fixed infinite reprocessing in External Nodes if
enqueueForTellFailure
is used.https://thingsboard-portal.atlassian.net/browse/PROD-3070
General checklist
Front-End feature checklist
Back-End feature checklist