Skip to content
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

Removing all messages from undeployed channel does not clear source connector statistics #3807

Open
rbeckman-nextgen opened this issue May 11, 2020 · 0 comments

Comments

@rbeckman-nextgen
Copy link
Collaborator

This was introduced in rev 7698 for MIRTH-2288.

We gave DonkeyEngineController.RemoveAllMessagesTask a way of removing all messages for an undeployed channel but when clearing statistics we don't include the source connector.

We reset statistics for the channel and all destination connectors but I think as an oversight we just dont include the source connector.
`
if (clearStatistics) {
Set statuses = Statistics.getTrackedStatuses();
dao.resetStatistics(channelId, null, statuses);

 for (com.mirth.connect.model.Connector connector : channelModel.getDestinationConnectors()) {
 dao.resetStatistics(channelId, connector.getMetaDataId(), statuses);
 }

}
`

I believe the simple fix would just be to add:

dao.resetStatistics(channelId, 0, statuses);

Also I noticed that in ChannelController.resetStatistics we actually commit each dao operation separately to avoid deadlocks, I'm not sure if that precaution needs to be taken into for this method as well.

Imported Issue. Original Details:
Jira Issue Key: MIRTH-3927
Reporter: eduardoa
Created: 2016-04-19T14:53:10.000-0700

@rbeckman-nextgen rbeckman-nextgen added this to the 3.10.0 milestone May 11, 2020
@cturczynskyj cturczynskyj removed this from the 3.10.0 milestone Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants