Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to read a WAL file outside OrientDB ? #10355

Open
Nulhiedbriks opened this issue Nov 7, 2024 · 1 comment
Open

How to read a WAL file outside OrientDB ? #10355

Nulhiedbriks opened this issue Nov 7, 2024 · 1 comment
Milestone

Comments

@Nulhiedbriks
Copy link

OrientDB Version: 3.2.26

After a crash server, Database is corrupt because of the UNIQUE index. I can't do anything whit this corrupt index. Some vertices are shown duplicated while there is an index and when i tried to delete one RID both are deleted. Some vertices are also here but cannot be display. (Invalid type null) error.

I've rebuild the db with a backup, but there is missing data (or updated data) that are surely in WAL file. When i put the WAL file in the new DB folder, nothing is done (WAL file is reset). I want to analyse what's inside the WAL file to add manually missing data. So how can i open/read a WAL file ?

@tglman
Copy link
Member

tglman commented Nov 12, 2024

Hi,

Is not easy to read the WAL file by hand, in there are present different set of records that describe different behaviours, if you want to check the types of records that we have just check everything that implements OWALRecord in the OrientDB codebase.

In the specific the data is kept in OUpdatePageRecord which is not the high level data but the binary diff changes of a transactional update of a single page of a single file, in the record itself there is also a "sequential" that identify the transaction, the same sequential is kept in the pages to verify what's the level of a persistent page compared to the changes in the WAL.

All the types of files, indexes, data, metadata use this type of WAL record to log the changes and recover them in case of crash.

I'm not sure actually how you can get to this state in the first place, did the crash happen during a version update or did happen with the same OrientDB version of the code running ?

@tglman tglman added this to the 3.2.x milestone Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants