fxsjy / treapdb

Automatically exported from code.google.com/p/treapdb
2 stars 1 forks source link

DiskTreap constructor should check for max key length #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I think it would be better if the constructor throws an exception if the 
index_block_size is too large (maybe there is a reason for allowing block sizes 
that can accomodate illegal key lengths ? )

What steps will reproduce the problem?
Constructors of the form: DiskTreap<FastString, byte[]>(index_block_size, 
indexFile);

should check the index_block_size-DiskTreapNode.STRING_KEY_OVER_HEAD is not 
greater than 127

Original issue reported on code.google.com by david.ge...@gmail.com on 4 Sep 2011 at 5:05