hanoidb can't recover when one of the database files does not exists in merge process. #35

Open
opened 2015-09-22 20:37:55 +00:00 by brigadier · 0 comments
brigadier commented 2015-09-22 20:37:55 +00:00 (Migrated from github.com)

It looks like hanoidb can't recover when one of the database A or B files does not exists in merge process.
When hanoidb files get damaged and hanoidb_merger:merge gets an error such as

23:09:07.647 [error] CRASH REPORT Process <0.8817.0> with 0 neighbours crashed with reason: no match of right hand value {error,enoent} in hanoidb_merger:merge/6 line 68
23:09:07.648 [error] Merger appears to have failed (reason: {badmatch,{error,enoent}}). Removing outfile database/client/data.hanoidb/X-9.data
23:09:07.648 [error] merge failed error:{badmatch,{error,enoent}} [{hanoidb_merger,merge,6,[{file,"src/hanoidb_merger.erl"},{line,68}]},{hanoidb_level,'-begin_merge/1-fun-0-',5,[{file,"src/hanoidb_level.erl"},{line,789}]},{proc_lib,init_p,3,[{file,"proc_lib.erl"},{line,224}]}]

it enters infinite loop in restart_merge_then_loop, keeps throwing this error and crashes the virtual machine by OOM.

To repeat the problem delete a couple of A/B database files while hanoidb runs and apply some load to the hanoidb to trigger merging

It looks like hanoidb can't recover when one of the database A or B files does not exists in merge process. When hanoidb files get damaged and hanoidb_merger:merge gets an error such as ``` 23:09:07.647 [error] CRASH REPORT Process <0.8817.0> with 0 neighbours crashed with reason: no match of right hand value {error,enoent} in hanoidb_merger:merge/6 line 68 23:09:07.648 [error] Merger appears to have failed (reason: {badmatch,{error,enoent}}). Removing outfile database/client/data.hanoidb/X-9.data 23:09:07.648 [error] merge failed error:{badmatch,{error,enoent}} [{hanoidb_merger,merge,6,[{file,"src/hanoidb_merger.erl"},{line,68}]},{hanoidb_level,'-begin_merge/1-fun-0-',5,[{file,"src/hanoidb_level.erl"},{line,789}]},{proc_lib,init_p,3,[{file,"proc_lib.erl"},{line,224}]}] ``` it enters infinite loop in restart_merge_then_loop, keeps throwing this error and crashes the virtual machine by OOM. To repeat the problem delete a couple of A/B database files while hanoidb runs and apply some load to the hanoidb to trigger merging
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/hanoidb#35
No description provided.