FINERACT-274: Not able to create the same datatable which was rejected by the maker checker before#5495
Open
edk12564 wants to merge 1 commit intoapache:developfrom
Open
FINERACT-274: Not able to create the same datatable which was rejected by the maker checker before#5495edk12564 wants to merge 1 commit intoapache:developfrom
edk12564 wants to merge 1 commit intoapache:developfrom
Conversation
f4c91b5 to
e473b39
Compare
- added datatable cleanup service after a maker checker rejection - checks if datatable was created in rejected command source, and if so deletes it - added integration test to assess orphan table deletion - accounted for MariaDB and PostgreSQL - accounted for group, center, loan account, office, and savings account levels Reported-By: Santosh Math
e473b39 to
54ae254
Compare
adamsaghy
requested changes
Feb 17, 2026
Contributor
adamsaghy
left a comment
There was a problem hiding this comment.
I dont think any of the changes are needed.
The attached integration tests are green without messing with transaction boundaries, neither having the "cleanup".
The maker-checker is fully rolled back, so no left over data. You can create datatable if it was rejected priorly.
Kindly asking you to double check!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: FINERACT-274, FINERACT-672, FINERACT-673, FINERACT-674, FINERACT-675, FINERACT-676
Problem
According to FINERACT-274, when a new datatable was rejected in the maker checker process, it creates an orphaned table by mistake, forcing developers to delete the table manually in their database. I've gone ahead and fixed this issue by adding a datatable cleanup service for maker checker rejections. More on this below.
To reproduce the problem:
Changes
The problem was found to affect the group, center, loan account, office, and savings accounts levels.
After diagnosing the issue, I found that during data table creation events, the transaction in maker-checker gets rolled backed. However, it turns out that MariaDB does not add DDL (data table changes) queries to a transaction, meaning when the maker-checker system rolls everything back for checking, the DDL actually executes and makes the table anyways. This means that when the data table is rejected, the orphaned data table exists in the database. PostgreSQL includes DDL as part of the transaction boundary, meaning it is not an issue when PostgreSQL is used.
To fix the issue, I added a cleanup service after every maker-checker rejection that checks if the rejection was a data table rejection. If that was the case, it cleans up the data table in question. If not, it continues as normal. This structure allows us to keep as much original logic as possible, while working in both PostgreSQL and MariaDB use cases.
To test my changes, I also added an integration test that tests the process of data table creation, maker-checker events, and another data table creation to determine if the data table was properly removed. I do this over the group, center, loan account, office, and saving account levels to make sure they don't produce the bugs mentioned in the various tickets.
I tried to follow convention as much as possible, but I may have missed some things so feedback is very welcome!
Results
Tests all pass:
For MariaDB:

For PostgreSQL:

Reproducing the issue no longer results in a "data table already exists" error:
Demo video is too big for Github, but here is the list of tables after submitting the maker command. You can see the test table.

And here is the list of tables after rejecting with the checker user. You can see there is no test table.

Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.