Abishek, BI repo is not a main line project of fineract so create github issue instead. JIRA will only for "apache/fineract" only.
On Sun, Dec 6, 2026 at 6:07 AM Abhishek Chaudhary < [email protected]> wrote: > Hi James, Aman, > > Thank youi both of you for your guidance. I'm not working with a real > implementation yet only Fineract's integration-test data (MariaDB and MySQL > and two tenants) so a volunteer with a real install or an anonymised copy > of one would help a lot until then I can run a scale test on generated data > to get first sizing numbers. > A folder in fineract-business-intelligence sounds good to me: it's > versioned and stays out of the Fineract repo and already has CDC and > Airflow i'll keep the migration itself narrow for now but since each step > exits 0 or 1 it could become Airflow tasks later (is that okay with you > James?) > On future releases the scripts read the schema at run time rather than > hard-coding a release i ran the whole flow on apache/fineract:develop with > 1.16.1 data upgraded by develop's Liquibase then the copy CDC and a > rollback and everything reconciled with no change A CI job in the BI repo > could repeat this for each release (Aman i hope this cover what you had in > mind for future releases) > The edge cases so far are case-sensitive text reports written in MySQL SQL > tables without a primary key large-object columns and time zones and Victor > anything else you've seen in production would be very welcome If all of > this works for everyone i'll open a Jira ticket and a PR to the BI repo. > > Thanks, > Abhishek > > On Sat, Dec 05, 2026 10:58 PM, Aman Mittal <[email protected]> > wrote: > >> Hi James, >> >> I think this should be part of deployment scripts, for a DevOps-related >> use case. (fineract + other Trusted Service) >> From what I can see, the POC is just "tweaks" and demonstration around >> the Apache Sea tunnel. So we can add this as a separate folder in >> fineract-business-intelligence. >> What remains is that we need volunteers to try this in their >> implementations and provide feedback. >> >> What we need is to cover those edge cases. >> >> Abhishek - can you also make sure if this can work on future releases of >> fineract? >> >> >> >> On Sat, 5 Dec, 2026, 8:23 pm James Dailey via dev, < >> [email protected]> wrote: >> >>> Hi Abhishek >>> >>> Great progress. Are you specifically working with an existing >>> implementation of Fineract somewhere? >>> Finding someone with a real world example, would be highly useful and >>> could add some nuance and operational sophistication to this. >>> If you already are, sorry if I missed that. >>> >>> In terms of where to save the scripts, I think they *should be in >>> source control* for sure and versioned. >>> >>> Two options: >>> 1) *Keep it in **Fineract,* there's reasons to think of this as part of >>> an "enhanced deployment" concept. The challenge with that is it further >>> clutters the code. >>> We should really do better by NOT including things in Fineract that are >>> not part of the essential runtime. That's a general principle we should >>> adhere to or adopt more strongly. >>> >>> 2)* Add it to a new Repo *- easy enough be we're starting to >>> proliferate these and I don't think a Migration tool needs its own repo. >>> Do you? Perhaps it belongs part of a broader concept. >>> I could easily be convinced that we need a new repo. I think it is >>> preferable to mushing it into the general Fineract repo. new repo for >>> Migration Tools or new repo for Data Pipelines? >>> >>> This sort of brings up an interesting topic. The concept of CDC is >>> applicable to building event driven architectures and if you follow the >>> work done on >>> https://github.com/apache/fineract-business-intelligence >>> <https://github.com/apache/fineract-business-intelligence> >>> >>> ( I know you're using it for just one aspect of this, but it does >>> suggest a broader architectural question...) >>> >>> you'll see that there was some thinking about using Kafka event >>> streaming eventually for a data warehouse concept in that project. >>> >>> Poking around, found this interesting summary ==> >>> https://www.geeksforgeeks.org/system-design/change-data-capture-cdc/ >>> >>> So, does it make sense as part of the BI repo, or perhaps part of some >>> broader Data Pipeline toolset? >>> In larger production instances, you might have ETLs like Airflow DAGS >>> going from/to Fineract. >>> What do you think? >>> >>> Please look into these things and I hope someone else with additional >>> production experience can weigh in on this too. Victor? >>> >>> thanks, james >>> Sent from Gmail Mobile >>> >>> On Fri, Dec 4, 2026 at 3:35 AM Abhishek Chaudhary < >>> [email protected]> wrote: >>> >>>> Hi all, >>>> >>>> The FSIP-9 migration POC is ready for review!! ₍₍⚞(˶>ᗜ<˶)⚟⁾⁾ : >>>> https://github.com/Abhishek6122008/fineract-postgres-migration-poc >>>> (the README has every step, result and script). FSIP-9 leaves migration >>>> support to volunteers on a best-effort basis, so this is meant as that: a >>>> guide and scripts built around Apache SeaTunnel, with no change to Fineract >>>> itself. Before I go further, I'd like to check that it's heading the right >>>> way. >>>> >>>> Scope, as discussed above: a planned move from MariaDB or MySQL to >>>> PostgreSQL on the same Fineract release, either offline in a maintenance >>>> window or with CDC so the window only covers the last changes. Not >>>> supported: zero-downtime parallel running with switch-over (what a 24x365 >>>> bank would need), and upgrading Fineract in the same window. >>>> >>>> What was tested (Fineract 1.16.1 to PostgreSQL 18, on Docker Compose, >>>> small seeded databases of about 30 MB): >>>> - Sources: MariaDB 12.2 and MySQL 8.4, both seeded by Fineract's >>>> integration tests. >>>> - Offline copy with SeaTunnel (pgloader for comparison). >>>> - CDC with SeaTunnel's MySQL-CDC source, as Aman asked. It resumes >>>> after a pause or a crash without copying everything again. In a full >>>> rehearsal with two tenants and live traffic, the window from stopping >>>> Fineract to a ready PostgreSQL was 42 s, not counting the reconciliation >>>> and Fineract's start-up. >>>> - Reconciliation, as James asked, written as a report to keep: row >>>> counts, sums of every decimal and date column, a checksum of every other >>>> column by row id, the trial balance, every loan and savings balance, and >>>> the tenant store settings. Everything matched, and changes made to the copy >>>> on purpose were each caught. >>>> - Fineract on the copy: the same API answers for all client, loan, >>>> savings and share data; new transactions and scheduled jobs work. >>>> - Every tenant in the tenant store; webhooks and jobs stay off on the >>>> copy until go-live. >>>> - Rollback: before go-live, Fineract goes back to the untouched >>>> MariaDB. After go-live, a script copies PostgreSQL back into a new MariaDB >>>> database and reconciles it the same way (tested for MariaDB). >>>> >>>> Precautions and environments, as Aman asked: the README covers a timed >>>> dry run on a copy of production, a tested backup, every Fineract instance >>>> and batch worker stopped (the scripts check), and the go/no-go point. It >>>> has notes for systemd, Kubernetes and managed databases, but only Docker >>>> Compose was tested. >>>> >>>> Licences (Aman's Category A requirement): nothing Category X is >>>> shipped. As for running Fineract itself on MariaDB or MySQL, users download >>>> the JDBC driver; SeaTunnel's MySQL connectors need MySQL Connector/J. >>>> >>>> What the guide has to warn about: >>>> - Usernames, the tenant header and client search become case-sensitive >>>> on PostgreSQL. Values that differ only by case (e.g. "Bob" and "bob") also >>>> block a rollback to MariaDB; the script checks for them first. >>>> - The seeded reports' SQL is replaced with the PostgreSQL version; >>>> reports a bank wrote or edited are listed, to be redone by hand. >>>> - 4 tables can't be followed by CDC (m_command, because of MariaDB's >>>> UUID type, and 3 tables without a primary key). They are copied at the >>>> start and only their changes at cutover. Primary keys on those 3 would let >>>> CDC follow them. >>>> >>>> Fineract report bugs found on the way (not caused by the copy): >>>> - 24 seeded reports fail on PostgreSQL in 1.16.1; FINERACT-2976 fixes >>>> them on develop. >>>> - 5 seeded reports give different results on PostgreSQL than on >>>> MySQL/MariaDB (Loan fully repaid, Dormant Prospects, the two weekly Trends >>>> reports, GeneralLedgerReport Table). >>>> - NOW() in report SQL uses the server's time instead of the tenant's, >>>> so some MySQL reports leave out today's rows for part of the day. >>>> >>>> Not done yet: seeding with the Cucumber E2E suite, sizing on a large >>>> real-world database, testing on managed databases (RDS and the like), and >>>> MariaDB GTIDs. Sifiso, Campbell: rough sizes (database size, loan and >>>> transaction counts) would help with the sizing. >>>> >>>> Questions: >>>> 1. Is a guide plus scripts the right shape, rather than a plugin? And >>>> should the scripts live in the Fineract repo, a separate repo, or only in >>>> the guide? >>>> 2. Would the deployment section of fineract-doc be the right place for >>>> the guide? >>>> >>>> If this looks good, I'll open a Jira ticket to track the guide and >>>> tickets for the report bugs, then write the chapter. >>>> Corrections and suggestions welcome. (╭ರ_•́) >>>> >>>> Thanks, >>>> Abhishek >>>> >>>> On Sat, Nov 28, 2026 03:54 PM, Abhishek Chaudhary < >>>> [email protected]> wrote: >>>> >>>>> Got it will keep CDC in scope 🫡 >>>>> >>>>> On Sat, 28 Nov, 2026, 3:20 pm Aman Mittal, < >>>>> [email protected]> wrote: >>>>> >>>>>> Abhishek, >>>>>> >>>>>> Keep CDC, as data can be large. And we don't need to restart backups >>>>>> from scratch. >>>>>> >>>>>> On Sat, 28 Nov, 2026, 1:09 pm Abhishek Chaudhary, < >>>>>> [email protected]> wrote: >>>>>> >>>>>>> Hi James, Aman, >>>>>>> >>>>>>> Thanks, both. Here's how I'd scope the guide: >>>>>>> >>>>>>> - In scope: a planned, offline migration from MariaDB to PostgreSQL >>>>>>> on the same Fineract release, with a reconciliation report (row counts, >>>>>>> money totals, the trial balance, and each loan and savings account's >>>>>>> balance) that an institution can show its supervisor. >>>>>>> - Out of scope, stated as not supported: zero downtime (CDC can come >>>>>>> later), running both databases in parallel with switch-over (what 24x365 >>>>>>> banks would need), and upgrading Fineract in the same window. >>>>>>> - Precautions: a timed dry run on a copy of production, a tested >>>>>>> backup, and everything that writes to MariaDB stopped during the copy, >>>>>>> including every Fineract instance. While checking, Fineract on >>>>>>> PostgreSQL >>>>>>> runs with scheduled jobs and outgoing messages (webhooks, SMS, events) >>>>>>> off. >>>>>>> - Rollback: the copy only reads from MariaDB, so before go-live, >>>>>>> rolling back means pointing Fineract back at it. After go-live there's >>>>>>> no >>>>>>> simple way back (new data is only in PostgreSQL), so the guide marks >>>>>>> that >>>>>>> go/no-go point clearly. >>>>>>> - Environments: the copy only needs network access to both >>>>>>> databases, but stopping Fineract and switching it over differs (systemd, >>>>>>> Docker Compose, Kubernetes), and managed databases have limits. The >>>>>>> guide >>>>>>> will note these; the POC is tested only on Docker Compose. >>>>>>> >>>>>>> Feel free to add any corrections, they'd be highly appreciated 😊 >>>>>>> >>>>>>> Thanks, >>>>>>> Abhishek >>>>>>> >>>>>>> On Sat, 28 Nov, 2026, 5:03 am James Dailey, <[email protected]> >>>>>>> wrote: >>>>>>> >>>>>>>> Abhishek - Downtime topic: >>>>>>>> >>>>>>>> In my experience, a few hrs of downtime over a weekend can be part >>>>>>>> of a planned migration. In a regulated entity, this type of planned >>>>>>>> downtime is subject to extensive process. >>>>>>>> >>>>>>>> In some places the banking Supervisor needs to see the plan, the >>>>>>>> test, and to get timely information about any issue. Documentation of >>>>>>>> how >>>>>>>> this works should be part of the "technology" and explained well. How >>>>>>>> does >>>>>>>> the migration do checks on validity? Reconciliation? >>>>>>>> >>>>>>>> Anything that reduces confidence in the country's banking system >>>>>>>> can be a negative. Think "bank run". >>>>>>>> >>>>>>>> Further, many 24x365 banking operations with 99.9999% uptime would >>>>>>>> treat a few hrs downtime as a failure. So, from a design point of view, >>>>>>>> they would have systems running in parallel with switching over logic. >>>>>>>> That >>>>>>>> is likely beyond your scope but it should be mentioned as "not >>>>>>>> supported" >>>>>>>> and "outside of scope". >>>>>>>> >>>>>>>> (Aside : Data pipes and ETLs should be addressable and schedulable. >>>>>>>> See Apache Airflow ? ) >>>>>>>> >>>>>>>> On the other hand, for non-banking financial institutions (NBFIs) >>>>>>>> the storyis a bit different. They don't have public deposits and don't >>>>>>>> have banking supervision (for the most part). Unless they are of >>>>>>>> significant importance as a payments processor, going down is entirely >>>>>>>> a >>>>>>>> matter of reputation risk. It's not uncommon for lending companies to >>>>>>>> have >>>>>>>> regularly scheduled downtimes. >>>>>>>> >>>>>>>> At the far end of the spectrum are small lenders like MFIs that may >>>>>>>> be closed all weekend and a few hrs of downtime is just a minor >>>>>>>> internal >>>>>>>> issue. >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> James >>>>>>>> >>>>>>>> Sent from Gmail Mobile >>>>>>>> >>>>>>>> On Fri, Nov 27, 2026 at 12:18 PM Abhishek Chaudhary < >>>>>>>> [email protected]> wrote: >>>>>>>> >>>>>>>>> Hi all, >>>>>>>>> >>>>>>>>> Following up on this thread after the Community Sync, I'd like to >>>>>>>>> take a first step for FSIP-9: an offline-copy POC with Apache >>>>>>>>> SeaTunnel, as >>>>>>>>> Aman suggested above, written up as a migration guide (settings, >>>>>>>>> security, >>>>>>>>> compute needs). >>>>>>>>> >>>>>>>>> This picks up from the March thread "End support of mySQL and >>>>>>>>> MariaDB; migration tooling related to FSIP-9". Jose noted that >>>>>>>>> pgloader >>>>>>>>> struggles with large transaction and journal-entry tables, and Sifiso >>>>>>>>> mentioned around 40 MFIs on MariaDB, so I'll start with MariaDB and >>>>>>>>> run >>>>>>>>> pgloader on the same data as a baseline. On Matrix, Aman mentioned >>>>>>>>> that a >>>>>>>>> few hours of downtime can be acceptable in banking (Aman, please >>>>>>>>> correct >>>>>>>>> me), so I'd start with an offline copy and leave zero-downtime/CDC >>>>>>>>> for a >>>>>>>>> later phase. >>>>>>>>> >>>>>>>>> Plan: >>>>>>>>> >>>>>>>>> 1. Seed MariaDB, on the same Fineract release as the target, with >>>>>>>>> the integration tests (they already run on MariaDB in CI and cover >>>>>>>>> savings, >>>>>>>>> deposits and shares) plus part of the Cucumber E2E suite. >>>>>>>>> 2. Start Fineract on a fresh PostgreSQL so Liquibase creates the >>>>>>>>> schema. >>>>>>>>> 3. Copy the data with SeaTunnel's JDBC to JDBC connector [1], and >>>>>>>>> with pgloader for comparison. >>>>>>>>> 4. Verify: row counts per table, sums of money columns and the >>>>>>>>> trial balance, Fineract starting on the copied data, and the same API >>>>>>>>> responses from both instances. >>>>>>>>> >>>>>>>>> What I've found so far: >>>>>>>>> >>>>>>>>> - Jira and GitHub have no earlier SeaTunnel work for Fineract; on >>>>>>>>> this list it has only been proposed so far. >>>>>>>>> - The E2E suite has 200 feature files, almost all loans (only 2 >>>>>>>>> for savings), and CI only runs it against PostgreSQL, so it may need >>>>>>>>> fixes >>>>>>>>> to run on MariaDB. >>>>>>>>> - Liquibase seeds reference data (permissions, configurations, >>>>>>>>> codes, reports), and about 200 changesets are MySQL-only and 220 >>>>>>>>> PostgreSQL-only. Report SQL, for example, is seeded in a PostgreSQL >>>>>>>>> dialect, so the copy can't simply overwrite seeded tables, and >>>>>>>>> DATABASECHANGELOG must not be copied. >>>>>>>>> - Other things to check: sequences, boolean columns, dates/time >>>>>>>>> zones, the tenant store, user-created datatables, and custom reports >>>>>>>>> written in MySQL SQL. >>>>>>>>> >>>>>>>>> Questions: >>>>>>>>> >>>>>>>>> 1. Sifiso, Campbell: could you share rough sizes (database size, >>>>>>>>> loan and transaction counts) and the Fineract release you run, so the >>>>>>>>> compute numbers are realistic? >>>>>>>>> 2. Does anyone need MySQL as a source, or is MariaDB enough to >>>>>>>>> start? >>>>>>>>> 3. Which seeded tables should keep the target's rows (e.g. >>>>>>>>> reports) and which should take the source's (e.g. configurations)? >>>>>>>>> 4. Would a page in the deployment section of fineract-doc be the >>>>>>>>> right home for the guide? >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Abhishek >>>>>>>>> >>>>>>>>> [1] >>>>>>>>> https://www.google.com/url?q=https://seatunnel.apache.org/docs/getting-started/recipes/jdbc-to-jdbc/&source=gmail&ust=1795896497484000&sa=E >>>>>>>>> >>>>>>>>> On Thu, Nov 12, 2026 12:01 PM, Aman Mittal < >>>>>>>>> [email protected]> wrote: >>>>>>>>> >>>>>>>>>> I researched that over 80% of migration problems can be solved >>>>>>>>>> with Apache SeaTunnel (https://seatunnel.apache.org/) itself, as >>>>>>>>>> a sister project. We could build around it for more >>>>>>>>>> Fineract-specific needs. >>>>>>>>>> >>>>>>>>>> On Thu, Nov 12, 2026 at 11:34 AM Aman Mittal < >>>>>>>>>> [email protected]> wrote: >>>>>>>>>> >>>>>>>>>>> Also looking for Apache SeaTunnel if it can replace the need. >>>>>>>>>>> >>>>>>>>>>> On Thu, Nov 12, 2026 at 10:27 AM Aman Mittal < >>>>>>>>>>> [email protected]> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi All, >>>>>>>>>>>> >>>>>>>>>>>> We have long voted on and accepted FSIP-9. Since the community >>>>>>>>>>>> suggested and the majority agreed, provided that "Proper migration >>>>>>>>>>>> steps >>>>>>>>>>>> were considered for Postgres," I want to revive discussions on the >>>>>>>>>>>> next >>>>>>>>>>>> steps. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> https://cwiki.apache.org/confluence/spaces/FINERACT/pages/406622736/FSIP-9+Standardize+on+PostgreSQL >>>>>>>>>>>> >>>>>>>>>>>> I think we can brainstorm ideas for the migration steps. One of >>>>>>>>>>>> the suggestion it received was that we can use pgloader. However, >>>>>>>>>>>> many >>>>>>>>>>>> companies or vendors are concerned that their data volume may be >>>>>>>>>>>> large >>>>>>>>>>>> based on their organizational size. >>>>>>>>>>>> >>>>>>>>>>>> I suggest we create a dedicated plugin or perhaps a shared >>>>>>>>>>>> plugin that exists outside of Fineract Core. >>>>>>>>>>>> >>>>>>>>>>>> What the plugin will do: (It will parallelly sync and monitor >>>>>>>>>>>> the migration in real time 1:1 with MariaDB or MySQL). Then the >>>>>>>>>>>> vendors can >>>>>>>>>>>> implement and sync to PostgreSQL via CDC or other available >>>>>>>>>>>> methods. >>>>>>>>>>>> >>>>>>>>>>>> When the data keeps syncing to PostgreSQL. Vendors can validate >>>>>>>>>>>> and test schema changes live without incurring downtime. >>>>>>>>>>>> >>>>>>>>>>>> HARD Requirement: Plugin dependency should be ASF compliant >>>>>>>>>>>> (Category A dependencies) >>>>>>>>>>>> >>>>>>>>>>>> I think this idea is worth exploring. >>>>>>>>>>>> >>>>>>>>>>>> Regards >>>>>>>>>>>> Aman >>>>>>>>>>>> >>>>>>>>>>>
