From 8ccd02e89325ecffac892bb24c9d7aeb99df1e42 Mon Sep 17 00:00:00 2001 From: martinsumner Date: Mon, 12 Dec 2016 18:30:12 +0000 Subject: [PATCH] Merge Tree issue The attempt to refcator the writer meant that files were never reaching the max slots - and so we were only ever stopping when the lists were exhausted. This meant that the merge tree just had a C0 and a C1 file! --- src/leveled_sft.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/leveled_sft.erl b/src/leveled_sft.erl index 9069751..c2194fb 100644 --- a/src/leveled_sft.erl +++ b/src/leveled_sft.erl @@ -836,7 +836,7 @@ write_keys(Handle, KL1, KL2, LevelR, WriteFun, WState, {complete_keywrite(Handle0, WState0, WriteFun), {[], []}}; {full, KL1Rem, KL2Rem} -> write_keys(Handle, KL1Rem, KL2Rem, LevelR, WriteFun, WState, - {SlotC + 1, SlotT, SlotLists ++ [BlockKeyLists]}) + {SlotC + 1, SlotT + 1, SlotLists ++ [BlockKeyLists]}) end.