orientechnologies / orientdb

OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.
https://orientdb.dev
Apache License 2.0
4.74k stars 870 forks source link

Error importing big database in orientdb #10302

Open rleon10 opened 1 month ago

rleon10 commented 1 month ago

Hello, I have done an export of 15 Databases in orientdb and im getting an error when I try to import one of them. The import of the rest 14 databases worked fine, all export files (xxx_export.json.gz) weight less than 1GB. But the DB which is giving me errors after importing all records and migrating indexes is 1,8GB.

I dont know if there is a limit size for files, limited time to do an import, if im doing anything wrong or the Databases Im trying to import has some "corrupted" recods/indexes

Thank you so much in advance

tglman commented 1 month ago

Hi,

This seems related to the "dictionary" index that was a special index that was used as key value index in the past, can you try to just delete this index in the source database and try to export and re-import again ?

Regards

rleon10 commented 1 month ago

Hi, I have removed the index "dictionary" that is the one which appears in the error message. After re-importing the database (doing a previous export of the database without the "dictionary" index) , the index appears again image image

I have also tried to rebuild the Index but it says "Cannot rebuild index 'dictionary' because it's manual and there aren't indications of what to index"

Also I have checked the others DB that I managed to import and all of them have the Index "dictionary" as "undefined", but their imports had no issues.

I have also tried to export with the flag -includeManualIndexes=FALSE, the error im getting is when Importing "manual" indexes

tglman commented 1 month ago

Hi,

By the way, what version are you using for export and what for import ?

Regards

rleon10 commented 1 month ago

Hello, here is the configuration when importing for a r5.4xlarge EC2 machine (128G memory):

tglman commented 1 month ago

Hi,

I see, I do recall some issues with the importer in 2.2.x but unfortunately we do not do release updates anymore for the 2.2.x (has been out of support for a few years actually) is there any reason you do not update to a more recent version ?

Regards

rleon10 commented 1 month ago

We are migrating to MongoDB but meanwhile we have to maintain orientdb 2.2.31

Regards

tglman commented 1 month ago

Hi,

I see, anyway is quite hard to help you on that old version, one attempt you can try is to unzip the export, which is just a big compressed json file, and try to remove the json block of manual indexes.

It could be interesting for me to know the reason why you are moving out of OrientDB, so feel free to share and if you prefer to do it in private feel free to reach me on matrix: https://matrix.to/#/@tglman:matrix.org or by mail at tglman_at_tglman.com