FINERACT-2516: Upgrade MariaDB support to version 12#5566
Conversation
|
I can review this tomorrow. I did a mariadb version bump a while ago, see b053c90 |
|
I see |
There was a problem hiding this comment.
the diff looks fine to me except:
- It looks like CI is still failing so far.
- I think we should change everywhere
11.5.2shows up in the docs to12.2.
I also haven't run any tests locally with mariadb 12.2 yet. I'll do that now.
@airajena , are you able to identify, repro, and fix the failing tests?
|
@meonkeys always happy to have a hand during the review. |
|
@airajena please do a rebase |
Yes working on it |
91ed346 to
471bc24
Compare
I checked the failing ci checks, they are not related to version change, if it was then it should show concrete SQL/driver error. |
471bc24 to
07a9ee4
Compare
|
@airajena wrote:
Thanks for checking. I understand and agree. We still need a passing build before merging. I skimmed the build logs, but I don't understand the test failures and there are many. I'll try re-running all the failed tests. Otherwise this PR looks good to me. Did you figure out what was mucking with line endings for the |
Yes, repo has no .gitattributes rule enforcing .adoc line endings. git check-attr for those .adoc files returns no EOL attributes. Those files are expected as LF (git ls-files --eol shows i/lf). I have windows, so if any Windows tool saves with CRLF (for example a full-file rewrite API/editor default), Git sees the whole file as changed. That’s exactly the churn pattern we hit. |
|
@airajena integration tests are still failing and I don't know why. Can you learn anything else from the logs? Can you repro locally? I'd say try rebasing onto the tip of |
|
hii @airajena just a suggestion try running grep -r "mariadb" . , i found more files where changes are needed like kubernetes/fineractmysql-deployment.yml i hope it helps you |
@nidhiii128 Thanks for sharing Regarding |
|
I've reproduced the CI failures locally after running the full integration test suite (approx. 3-hour runtime). The failures appear to be systemic rather than isolated. The primary bottleneck is in the Spring Batch / COB (Close of Business) jobs. Most tests are failing with exitCode=UNKNOWN, specifically throwing org.springframework.batch.core.JobExecutionException. |
|
|
||
| @Container | ||
| private static final MariaDBContainer<?> MARIADB_CONTAINER = new MariaDBContainer<>(DockerImageName.parse("mariadb:11.4")) | ||
| private static final MariaDBContainer<?> MARIADB_CONTAINER = new MariaDBContainer<>(DockerImageName.parse("mariadb:12.2")) |
There was a problem hiding this comment.
@airajena Good effort on the version bump, but changing the version string broke the Testcontainers initialization.
If you look at the CI logs, the Integration Tests aren't failing due to schema or collation issues; they are timing out (hanging for 20-27 minutes). The Java MariaDBContainer class relies on parsing the container's startup logs to know when it's ready. MariaDB 12 changed its startup log format, causing Testcontainers' default LogMessageWaitStrategy to wait infinitely.
We need to override the wait strategy in CommandBaseTest.java to use a standard TCP port wait strategy instead of the default log string matcher:
@container
private static final MariaDBContainer<?> MARIADB_CONTAINER = new MariaDBContainer<>(DockerImageName.parse("mariadb:12.2"))
.withNetwork(network).withUsername("root").withPassword("mifos").withDatabaseName("fineract-test")
.waitingFor(Wait.forListeningPort());
Apply that override and the Integration Test shards will stop hanging and go green.
There was a problem hiding this comment.
cool, thanks for the help, done the following changes,
There was a problem hiding this comment.
cool, thanks for the help, done the following changes,
@airajena did you check your forked fineract version for cicd pass, check that and take action if any error.
e550c01 to
2f990ec
Compare
2f990ec to
99ee138
Compare
|
Rebased on 5bb0b3b with fingers crossed. I just restarted the failing |
99ee138 to
81da5d1
Compare
|
rebased on |
I investigated the MariaDB 12 CI failures after rebasing to latest develop. The The actual failures happen later inside the integration tests, after MariaDB and Fineract are already up. The common error is:
The affected tables are:
This points to a MariaDB 12 transaction-behavior change, not a JDBC auth/handshake problem and not a Liquibase/Hibernate startup issue. The failure is concentrated in concurrency-sensitive write paths, and I was able to reproduce and validate locally against The fix was to explicitly disable I applied that consistently in:
I also updated the readiness probe to use root credentials so the logs no longer show the misleading So the issue was not the healthcheck warning; the real regression was MariaDB 12 snapshot isolation causing |
81da5d1 to
0e5fe62
Compare
0e5fe62 to
410f07f
Compare
cool integration tests are green now, the failing check is not code related. It is :rat rejecting mariadb_compat.cnf file with no approved Apache license header, adding and pushing the fix. |
|
Woah, fascinating. Would we then be using |
Actually for this PR, I treated it as a compatibility setting for the MariaDB 12 upgrade path, not as a claim that Fineract should globally prefer. I agree this deserves wider input if we intend to keep applying it outside CI/tests, I will explain this in detail in mailing list, let's see if we get a better way. There are really two possible directions.
|
|
This feature is Ok to be turned off for this upgrade. For production, this
variable turned off (which is the default setting in previous MariaDb
versions) will introduce data I consistency.
In Apache Fineract it has optimistic locking code and it must be upgraded.
I think that a follow up Jira Ticket should be raised about turning on this
variable that will help to fix the existing locking in Apache Fineract.
Regards
Victor
El vie., 6 de marzo de 2026 12:05 p. m., Aira Jena ***@***.***>
escribió:
… *airajena* left a comment (apache/fineract#5566)
<#5566 (comment)>
Woah, fascinating. Would we then be using innodb_snapshot_isolation=OFF
during tests and also recommending it for prod/deployments as well? If this
is a change we'll be making everywhere, please write the dev list and see
if anyone has input/feedback/advice. I don't have experience with this
database setting.
Actually for this PR, I treated it as a compatibility setting for the
MariaDB 12 upgrade path, not as a claim that Fineract should globally
prefer. I agree this deserves wider input if we intend to keep applying it
outside CI/tests, I will explain this in detail in mailing list, let's see
if we get a better way. There are really two possible directions.
1. Keep innodb_snapshot_isolation=OFF for MariaDB 12 so runtime
behavior stays aligned with what Fineract has already been validated
against.
2. Keep MariaDB 12 defaults and revisit the affected Fineract
transaction/locking flows so they are explicitly correct under the new
upgrade.
—
Reply to this email directly, view it on GitHub
<#5566 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALD2ZAQDLKJ3H2KRIHWGAC34PMHQPAVCNFSM6AAAAACWDIBVR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAMJTGIYDCOJSGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@meonkeys @IOhacker hii, so should I open a discussion on mailing list or leave, now that we already have a direction to proceed |
|
Open the Discussion, because it is a warning about turning off a very
important feature that is enabled by default in the MariaDb version 12.
Community must be aware of this, either for understanding why it is turned
off for the upgrade and how it will be solve with an improved locking mode.
El vie., 6 de marzo de 2026 12:22 p. m., Aira Jena ***@***.***>
escribió:
… *airajena* left a comment (apache/fineract#5566)
<#5566 (comment)>
This feature is Ok to be turned off for this upgrade. For production, this
variable turned off (which is the default setting in previous MariaDb
versions) will introduce data I consistency. In Apache Fineract it has
optimistic locking code and it must be upgraded. I think that a follow up
Jira Ticket should be raised about turning on this variable that will help
to fix the existing locking in Apache Fineract. Regards Victor El vie., 6
de marzo de 2026 12:05 p. m., Aira Jena *@*.
*> escribió: … <#m_-9025985592548107596_> airajena left a comment
(apache/fineract#5566 <#5566>)
<#5566 (comment)
<#5566 (comment)>>
Woah, fascinating. Would we then be using innodb_snapshot_isolation=OFF
during tests and also recommending it for prod/deployments as well? If this
is a change we'll be making everywhere, please write the dev list and see
if anyone has input/feedback/advice. I don't have experience with this
database setting. Actually for this PR, I treated it as a compatibility
setting for the MariaDB 12 upgrade path, not as a claim that Fineract
should globally prefer. I agree this deserves wider input if we intend to
keep applying it outside CI/tests, I will explain this in detail in mailing
list, let's see if we get a better way. There are really two possible
directions. 1. Keep innodb_snapshot_isolation=OFF for MariaDB 12 so runtime
behavior stays aligned with what Fineract has already been validated
against. 2. Keep MariaDB 12 defaults and revisit the affected Fineract
transaction/locking flows so they are explicitly correct under the new
upgrade. — Reply to this email directly, view it on GitHub <#5566 (comment)
<#5566 (comment)>>, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ALD2ZAQDLKJ3H2KRIHWGAC34PMHQPAVCNFSM6AAAAACWDIBVR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAMJTGIYDCOJSGE
<https://github.com/notifications/unsubscribe-auth/ALD2ZAQDLKJ3H2KRIHWGAC34PMHQPAVCNFSM6AAAAACWDIBVR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAMJTGIYDCOJSGE>
. You are receiving this because you were mentioned.Message ID: @.*>
@meonkeys <https://github.com/meonkeys> @IOhacker
<https://github.com/IOhacker> hii, so should I open a discussion on
mailing list or leave, now that we already have a direction to proceed
—
Reply to this email directly, view it on GitHub
<#5566 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALD2ZAQBTDVDOZQIU23ALLL4PMJM3AVCNFSM6AAAAACWDIBVR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAMJTGI4DOOBRHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
FINERACT-2516
Summary
This PR upgrades MariaDB support from 11.x to 12.x across runtime, development, and test container references, and updates the MariaDB JDBC driver version.
Scope
Risk
Low.
Changes are limited to version references for MariaDB image/driver and associated docs/test setup.