liuis / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Patch for /table/block.cc #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Look at line 192 and line 197.

We are in fact finding the first restart point with a key < target, so that we 
can forward to find the first key >= target.

The root cause is that those keys with value of target may spread on several 
continuous restart, so we have to find the last restart point with a key < 
target, not the first restart point with a key >= target.

Original issue reported on code.google.com by yalexfan on 28 Mar 2012 at 10:11

Attachments:

GoogleCodeExporter commented 9 years ago
Table allows no duplicates.  So there is at most
one possible key == "target".  Therefore I think the
code is correct as is; no patch necessary.

Perhaps you are thinking that leveldb might need to
store multiple versions with the same key in the same
Table/Block.  However leveldb augments the user key
with a version number, so by the time the key is stored
in a Table, it is unique.

I am closing the bug for now.  If I missed something,
and/or you have some test that shows a problem, don't
hesitate to reopen the bug.

Original comment by san...@google.com on 28 Mar 2012 at 3:38

GoogleCodeExporter commented 9 years ago
Issue 78 has been merged into this issue.

Original comment by san...@google.com on 28 Mar 2012 at 3:38