DB Recovery after Power falure

122 views
Skip to first unread message

Ioannis

unread,
Oct 24, 2014, 6:14:47 AM10/24/14
to orient-...@googlegroups.com

I had a power failure this morning and when i restarted my odb, it took a few minutes to recover (showing part of the log bellow).

I was wondering if there are any best practices to make the saved data as safe as possible. I am planning to build a really large database and i would hate to see it getting corrupted. I wouldn't mind losing data entered in the past hour or so, as long as the database remains solid.


...
2014-10-24 13:07:55:404 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:55:529 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:55:530 INFO 3090000 operations were processed, current LSN is OLogSequenceNumber{segment=374, position=66069319} last LSN is OLogSequ
enceNumber{segment=375, position=2926558} [OLocalPaginatedStorage]
2014-10-24 13:07:55:702 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:55:823 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:55:944 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:56:132 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:56:316 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:56:498 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:56:645 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:56:816 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:56:959 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:57:115 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:57:117 INFO 3100000 operations were processed, current LSN is OLogSequenceNumber{segment=375, position=1466115} last LSN is OLogSeque
nceNumber{segment=375, position=2926558} [OLocalPaginatedStorage]
2014-10-24 13:07:57:336 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:57:462 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:57:626 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:57:752 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:57:878 INFO Heap memory is low apply batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:57:982 INFO Apply last batch of operations are read from WAL. [OLocalPaginatedStorage]
2014-10-24 13:07:59:170 INFO Storage data restore was completed [OLocalPaginatedStorage]
2014-10-24 13:07:59:271 INFO Wait till indexes restore after crash was finished. [OIndexManagerShared]
2014-10-24 13:07:59:290 INFO Index dictionary is not automatic index and will be added as is. [OIndexManagerShared$RecreateIndexesTask]
2014-10-24 13:07:59:335 INFO Index dictionary was added in DB index list. [OIndexManagerShared$RecreateIndexesTask]
2014-10-24 13:07:59:338 INFO Start creation of index OUser.name [OIndexManagerShared$RecreateIndexesTask]
2014-10-24 13:07:59:584 INFO Index OUser.name was successfully created and rebuild is going to be started. [OIndexManagerShared$RecreateIndexesTask]
2014-10-24 13:07:59:586 INFO - Rebuilding index bb.OUser.name (estimated 3 items)... [OIndexRebuildOutputListener]
2014-10-24 13:07:59:590 INFO --> OK, indexed 3 items in 5 ms [OIndexRebuildOutputListener]
2014-10-24 13:07:59:825 INFO Rebuild of OUser.name index was successfully finished. [OIndexManagerShared$RecreateIndexesTask]
2014-10-24 13:07:59:826 INFO Start creation of index ORole.name [OIndexManagerShared$RecreateIndexesTask]
2014-10-24 13:07:59:983 INFO Index ORole.name was successfully created and rebuild is going to be started. [OIndexManagerShared$RecreateIndexesTask]
2014-10-24 13:07:59:984 INFO - Rebuilding index bb.ORole.name (estimated 3 items)... [OIndexRebuildOutputListener]
2014-10-24 13:07:59:988 INFO --> OK, indexed 3 items in 4 ms [OIndexRebuildOutputListener]
2014-10-24 13:08:00:340 INFO Rebuild of ORole.name index was successfully finished. [OIndexManagerShared$RecreateIndexesTask]
2014-10-24 13:08:00:494 INFO 3 indexes were restored successfully, 0 errors [OIndexManagerShared$RecreateIndexesTask]
2014-10-24 13:08:00:495 INFO Indexes restore after crash was finished. [OIndexManagerShared]

Andrey Lomakin

unread,
Oct 24, 2014, 6:54:10 AM10/24/14
to orient-database
Hi,
Short recovery cycle will be implemented in 2.1 look at https://github.com/orientechnologies/orientdb/issues/2874 and https://github.com/orientechnologies/orientdb/issues/1603 once it is done you will have much shorter recovery cycle.

--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

Valentin Popov

unread,
Nov 12, 2015, 7:46:35 AM11/12/15
to OrientDB
Andrey, hello. 

Using DB 2.1.5

Is it possible to somehow detect that recovery needed? Or run recovery as Future task?

This is needed for starting application and not wait for database startup, as it used as supporting application. When DB will recover and start it can notice that it is started, so main application will know, it is ok and I can work with it? 

Regards,
Valentin 



пятница, 24 октября 2014 г., 14:54:10 UTC+4 пользователь Andrey Lomakin написал:

Andrey Lomakin

unread,
Nov 20, 2015, 4:26:48 AM11/20/15
to OrientDB
Hi Valentin,
We have flag we for sure can not run recovery as background process.
But we may add callback after storage will be opened so you may open storage in background thread and then use it.
If that is OK may you open issue about that ?
Best regards,
Andrey Lomakin, R&D lead. 
OrientDB Ltd

twitter:@Andrey_Lomakin linkedin:https://ua.linkedin.com/in/andreylomakin
Reply all
Reply to author
Forward
0 new messages