Search range failure
Discovered a bug with search ranges in leveled_tree - this was uncovered by an intermittently fialing 19.3 test. Test case added and bug fixed. It was due to a fialure to use end_key passed causing issues with particular manifests and full bucket ranges.
This commit is contained in:
parent
a128dcdadf
commit
36264eb416
5 changed files with 78 additions and 9 deletions
|
@ -1128,6 +1128,49 @@ snapshot_timeout_test() ->
|
|||
Man10 = release_snapshot(Man9, ?PHANTOM_PID),
|
||||
?assertMatch(0, length(Man10#manifest.snapshots)).
|
||||
|
||||
potential_issue_test() ->
|
||||
Manifest =
|
||||
{manifest,{array,9,0,[],
|
||||
{[],
|
||||
[{manifest_entry,{o_rkv,"Bucket","Key10",null},
|
||||
{o_rkv,"Bucket","Key12949",null},
|
||||
"<0.313.0>","./16_1_0.sst"},
|
||||
{manifest_entry,{o_rkv,"Bucket","Key129490",null},
|
||||
{o_rkv,"Bucket","Key158981",null},
|
||||
"<0.315.0>","./16_1_1.sst"},
|
||||
{manifest_entry,{o_rkv,"Bucket","Key158982",null},
|
||||
{o_rkv,"Bucket","Key188472",null},
|
||||
"<0.316.0>","./16_1_2.sst"}],
|
||||
{idxt,1,
|
||||
{{[{{o_rkv,"Bucket1","Key1",null},
|
||||
{manifest_entry,{o_rkv,"Bucket","Key9083",null},
|
||||
{o_rkv,"Bucket1","Key1",null},
|
||||
"<0.320.0>","./16_1_6.sst"}}]},
|
||||
{1,{{o_rkv,"Bucket1","Key1",null},1,nil,nil}}}},
|
||||
{idxt,0,{{},{0,nil}}},
|
||||
{idxt,0,{{},{0,nil}}},
|
||||
{idxt,0,{{},{0,nil}}},
|
||||
{idxt,0,{{},{0,nil}}},
|
||||
{idxt,0,{{},{0,nil}}},
|
||||
{idxt,0,{{},{0,nil}}},
|
||||
[]}},
|
||||
19,[],0,
|
||||
{dict,0,16,16,8,80,48,
|
||||
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
|
||||
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}},
|
||||
2},
|
||||
Range1 = range_lookup(Manifest,
|
||||
1,
|
||||
{o_rkv, "Bucket", null, null},
|
||||
{o_rkv, "Bucket", null, null}),
|
||||
Range2 = range_lookup(Manifest,
|
||||
2,
|
||||
{o_rkv, "Bucket", null, null},
|
||||
{o_rkv, "Bucket", null, null}),
|
||||
io:format("Range in Level 1 ~w~n", [Range1]),
|
||||
io:format("Range in Level 2 ~w~n", [Range2]),
|
||||
?assertMatch(3, length(Range1)),
|
||||
?assertMatch(1, length(Range2)).
|
||||
|
||||
|
||||
-endif.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue