* WRT testing with MongoDB - are you testing with a local MongoDB instance? Do you happen to know whether a specific test class is slow?
Yes I use org.testcontainers.testcontainers (1.19.7) so my junit starts a mongo container in a "@beforeAll" style, so only one time before any tests, anyway I take times after the instantiation of the container. I have a test project which based on maven profile I can switch between our current jackrabbit 2.x implementation and the oak one, our api was built some years ago in a way that is easy switch between the two different technologies. My test simply create repository and populates with many nodes, I have many more tests testing searches and so on but now I'm focusing only in the first one, repository creation and population and oak with mongo is really slower than jack 2.x, just for example: VoidTest - jackrabbit - mariadb - all properties indexed - datastore on filesystem Jackrabbit repository created for workspace "default"] et 1520 ms Jackrabbit repository created for workspace "arpav"] et 523 ms Modules started for workspace "default"] et 16838 ms Modules started for workspace "arpav"] et 9837 ms VoidTest - oak - mongo - all properties indexed - datastore on mongo too (I tried with datastore on filesystem too, there was no particular benefit) Oak repository created for workspace "default"] et 6134 ms Oak repository created for workspace "arpav"] et 1684 ms Modules started for workspace "default"] et 37778 ms Modules started for workspace "arpav"] et 29388 ms * As for testing with RDB instead - that won't be faster, as the RDB document essentially emulates the Mongo API. this worries me because as I stated same code with jackrabbit 2.x on mariadb is very faster than with oak in mongodb. * Re Mysql and MariaDB - these were added back then because they seemed to work just fine. I haven't tried since. The exception seems to indicate that MariaDBs limits for primary key size are a problem; maybe that can be fixed with additional config (of the DB or the tables). I gave a look to RDBDocumentStoreDB and it's quite simple find the issue, it is not recognizing MariaDb, it only knows MySql so it uses DEFAULT when it comes MariaDb from DatabaseMetaData and so it uses the default getTableCreationStatement which has varchar which cannot work in MariaDb In jackrabbit 2.x we used since years mariadb without problems, now in oak I can try using mysql connector jdbc driver, should be compatible with mariadb and in this way oak code recognizes it... but it is not so much fine, I would like to contribute changing that code. Thanks 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://2655225.fs1.hubspotusercontent-na1.net/hubfs/2655225/0.0%20Cegeka%20(new)/1.%20Visuals/Email%20Signatures/Annual_Report_Visuals_2023_Email%20Banner%201.png]<https://www.cegeka.com/it/annual-report-2023?utm_campaign=[EN]%20-%20Annual%20Report%202023&utm_source=email%20signature%20banner&utm_medium=email%20signature%20banner%20annual%20report%202023> 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: Monday, September 30, 2024 10:27 AM To: [email protected] <[email protected]> Subject: Re: Problems in using RDB DocumentStore on mariadb On 2024/09/29 15:53:22 Raffaele Gambelli wrote: > Hi all, > > I'm testing my code either with jackrabbit 2.x on mariadb or oak on mongodb, > both with filedatastore. > > I've found executing benchmarks that oak with mongo is really slow compared > to jackrabbit, so I wanted test oak with mariadb, I'm not able to do it > working, when I try I see in logs: > ... WRT testing with MongoDB - are you testing with a local MongoDB instance? Do you happen to know whether a specific test class is slow? (Note that when you test without a local test instance, a dockerized MongoDB is instantiated for every test, there maybe a JIRA ticket for that). As for testing with RDB instead - that won't be faster, as the RDB document essentially emulates the Mongo API. RDB support has been dormant for several years, so I'm not surprised that there may be problems (I've restarted testing with Apache Derby (embedded, see https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fci-builds.apache.org%2Fjob%2FJackrabbit%2Fjob%2Fjackrabbit-oak-trunk-derby-ibm-java21%2F&data=05%7C02%7CRaffaele.Gambelli%40cegeka.com%7C17dfa3ebc4094e764af608dce129b470%7C42151053019347aa9e81effd81f772cc%7C0%7C0%7C638632816457014932%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=WZBXbyhxxB2PGPQ0CwWZk4qFspq3dvk59Lqoo4CVk3A%3D&reserved=0)<https://ci-builds.apache.org/job/Jackrabbit/job/jackrabbit-oak-trunk-derby-ibm-java21/> and PostgreSQL, with which most tests are passing right now). Re Mysql and MariaDB - these were added back then because they seemed to work just fine. I haven't tried since. The exception seems to indicate that MariaDBs limits for primary key size are a problem; maybe that can be fixed with additional config (of the DB or the tables). Best regards, Julian
