The transaction isolation level, at least for MariaDB you can set in the command run line, for example in this way:
mysqld --lower-case-table-names=1 --character-set-server=utf8 --collation-server=utf8_unicode_ci --transaction-isolation=READ-COMMITTED --max-allowed-packet=128M --max_connections=250 While character-set and collation can be set at db level, the transaction isolation level can be set globally or at session level. Best regards Cordiali saluti / Best regards, Raffaele Gambelli Senior Java Developer E [email protected]<mailto:[email protected]> [CEGEKA] Via Ettore Cristoni, 84 IT-40033 Bologna (IT),Italy T +39 02 2544271 WWW.CEGEKA.COM<https://www.cegeka.com> [https://signature.cegeka.com/SignatureRO/bannerRO.jpg] Dichiarazione di Riservatezza Le informazioni contenute nella mail sono riservate. Se si rende conto di non essere il destinatario corretto della mail, la preghiamo di segnalare l'errore al mittente e di cancellare immediatamente il messaggio. L’utilizzo improprio di informazioni riservate può comportare sanzioni. Protezione dei dati personali La informiamo che i suoi dati saranno trattati da Cegeka nel rispetto delle disposizioni di legge applicabili (D. Lgs 196/2003 e Regolamento UE 679/2016). Per maggiori dettagli può consultare le nostre informative privacy al link https://www.cegeka.com/it/informazioni-sulla-privacy.<https://www.cegeka.com/it/informazioni-sulla-privacy> ________________________________ From: Julian Reschke <[email protected]> Sent: Friday, October 11, 2024 11:52 AM To: [email protected] <[email protected]> Subject: Re: Problems in using RDB DocumentStore on mariadb On 11.10.2024 11:06, Raffaele Gambelli wrote: > I've notifced this code in RDBDocumentStore: > > int isolation = con.getTransactionIsolation(); > String isolationDiags = > RDBJDBCTools.isolationLevelToString(isolation); > if (isolation != Connection.TRANSACTION_READ_COMMITTED) { > LOG.info("Detected transaction isolation level " + isolationDiags > + " is " > + (isolation < Connection.TRANSACTION_READ_COMMITTED ? > "lower" : "higher") + " than expected " > + > RDBJDBCTools.isolationLevelToString(Connection.TRANSACTION_READ_COMMITTED) > + " - check datasource configuration"); > } > > Now the default isolation level for MariaDB is REPEATABLE_READ so it will be > logged that log, I'm asking if there is some known restriction or strong > recomendation in using READ_COMMITTED? I believe not because it is only an > info log but why does it is expected? > > Thanks, > ... I believe it's the lightest isolation level we need, thus we recommend it. I don't recall where it can be set? Maybe in the JDBC URL? Best regards, Julian
