Duplicate transaction groups, cannot remove

On a server, there’s a project installed, having 6 transaction groups running.

The problem is, there are now 18 groups running, of which 12 cannot be touched in any way. They’re duplicates of the 6 actual groups, resulting in three times the scans.

How can I remove the duplicates? How do I avoid creating such duplicates?

How to reproduce:

Gateway version is 7.3.3 (b570).

I’m not sure exactly how it happened, but here are some very likely related details:

The project gets updates once in a while using the following procedure:

  • Open the project in a designer
  • Back up transaction groups, stop groups and save project
  • Close designer
  • Overwrite the project with a new .proj file (the new version)
  • Open the project in designer
  • Restore transaction groups from the backup xml
  • Start groups and save project
  • Close designer

I made an update once at day A, then few days later at day B, I made another. Then another few days later I noticed there are more rows than should.

Looking into the data, instead of one sets of rows, there were two sets of rows starting at day A. Starting at day B, there were three sets of rows per group scan.

Do you have more than one project with the same groups? Are you always overwriting just a single project? Do you see more than 6 groups in the designer?

There are two projects installed on the gateway, but the other has three different groups. It’s a project I don’t administer, so it’s likely pretty unrelated. To be exact, there are 21 (3+3*6) transaction groups running.

Only the one project with 6 groups was overwritten each time.

There’s only 6 groups in the designer. And if I stop the groups from the designer, then there’s 6 groups stopped, but 12 groups still running on the server.

The first thing I’d need is removing the redundant groups. What could I do?

Hi,

Yes, it sounds like somehow, multiple copies of your groups have been imported. I suppose you really only have two options: delete the running groups, restart the gateway, and repeat until all copies are deleted, or run a query against the internal database to delete the others, and restart the gateway to clear things out.

You can do the latter by going to Configure>Console>Advanced in the gateway. After going through the warning, you can look at all of the groups with this:

SELECT * FROM PROJECT_RESOURCES where RESOURCETYPE='group'

There are 3 different fields that will make up a “unique” group: ProjectId, ParentUUID, and Name.
You should be able to see fairly quickly whether there are multiple rows for those parameters. Then, you may add an “ORDER BY RESOURCEID” to get an idea of which groups are the newest. You’ll want to just delete the older copies, for that project.

So, let’s say that the groups are in project id 1, and the newest 6 groups start with id 36. You could do:

DELETE FROM PROJECT_RESOURCES WHERE PROJECTID=1 AND RESOURCEID<36

After running that, you’ll need to restart the gateway before the changes will be seen.

I’ll have to take a look at whether the importing of groups over existing groups has been fixed, I feel like this has come up before.

Regards,