lsmTree's page lookup semantics changed so that returns the page id that a tuple would be on. The test was written assuming the user passes in a tuple that
appears at the beginning of the page.
This commit is contained in:
parent
f2df518338
commit
3c4b7f6601
1 changed files with 3 additions and 1 deletions
|
@ -39,12 +39,14 @@ void insertProbeIter(lsmkey_t NUM_ENTRIES) {
|
||||||
recordid tree = TlsmCreate(xid, intcmp,
|
recordid tree = TlsmCreate(xid, intcmp,
|
||||||
TlsmRegionAlloc, &alloc_conf,
|
TlsmRegionAlloc, &alloc_conf,
|
||||||
sizeof(lsmkey_t));
|
sizeof(lsmkey_t));
|
||||||
|
long oldpagenum = -1;
|
||||||
for(lsmkey_t i = 0; i < NUM_ENTRIES; i++) {
|
for(lsmkey_t i = 0; i < NUM_ENTRIES; i++) {
|
||||||
long pagenum = TlsmFindPage(xid, tree, (byte*)&i);
|
long pagenum = TlsmFindPage(xid, tree, (byte*)&i);
|
||||||
assert(pagenum == -1);
|
assert(pagenum == -1 || pagenum == oldpagenum || oldpagenum == -1);
|
||||||
DEBUG("TlsmAppendPage %d\n",i);
|
DEBUG("TlsmAppendPage %d\n",i);
|
||||||
TlsmAppendPage(xid, tree, (const byte*)&i, TlsmRegionAlloc, &alloc_conf, i + OFFSET);
|
TlsmAppendPage(xid, tree, (const byte*)&i, TlsmRegionAlloc, &alloc_conf, i + OFFSET);
|
||||||
pagenum = TlsmFindPage(xid, tree, (byte*)&i);
|
pagenum = TlsmFindPage(xid, tree, (byte*)&i);
|
||||||
|
oldpagenum = pagenum;
|
||||||
assert(pagenum == i + OFFSET);
|
assert(pagenum == i + OFFSET);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue