fix compiler warning; remove dead code
git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@527 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe
This commit is contained in:
parent
38f2cb3897
commit
cead29f0e9
2 changed files with 1 additions and 58 deletions
|
@ -92,7 +92,6 @@ private:
|
|||
inline void readbytes(int xid, int32_t offset, int count, byte **data=0);
|
||||
|
||||
private:
|
||||
int fix_pcount; //number of pages in a standard data page
|
||||
int pcount;
|
||||
pageid_t *pidarr;
|
||||
int32_t byte_offset;//points to the next free byte
|
||||
|
@ -101,6 +100,7 @@ private:
|
|||
//page alloc function
|
||||
pageid_t (*alloc_region)(int, void*);
|
||||
void *alloc_state;
|
||||
int fix_pcount; //number of pages in a standard data page
|
||||
|
||||
static const int32_t HEADER_SIZE;
|
||||
|
||||
|
|
|
@ -19,63 +19,6 @@
|
|||
|
||||
template class DataPage<datatuple>;
|
||||
|
||||
/**
|
||||
* REGION ALLOCATION
|
||||
**/
|
||||
pageid_t alloc_region(int xid, void *conf)
|
||||
{
|
||||
RegionAllocConf_t* a = (RegionAllocConf_t*)conf;
|
||||
|
||||
if(a->nextPage == a->endOfRegion) {
|
||||
if(a->regionList.size == -1) {
|
||||
//DEBUG("nextPage: %lld\n", a->nextPage);
|
||||
a->regionList = TarrayListAlloc(xid, 1, 4, sizeof(pageid_t));
|
||||
DEBUG("regionList.page: %lld\n", a->regionList.page);
|
||||
DEBUG("regionList.slot: %d\n", a->regionList.slot);
|
||||
DEBUG("regionList.size: %lld\n", a->regionList.size);
|
||||
|
||||
a->regionCount = 0;
|
||||
}
|
||||
DEBUG("{%lld <- alloc region arraylist}\n", a->regionList.page);
|
||||
TarrayListExtend(xid,a->regionList,1);
|
||||
a->regionList.slot = a->regionCount;
|
||||
DEBUG("region lst slot %d\n",a->regionList.slot);
|
||||
a->regionCount++;
|
||||
DEBUG("region count %lld\n",a->regionCount);
|
||||
a->nextPage = TregionAlloc(xid, a->regionSize,12);
|
||||
DEBUG("next page %lld\n",a->nextPage);
|
||||
a->endOfRegion = a->nextPage + a->regionSize;
|
||||
Tset(xid,a->regionList,&a->nextPage);
|
||||
DEBUG("next page %lld\n",a->nextPage);
|
||||
}
|
||||
|
||||
DEBUG("%lld ?= %lld\n", a->nextPage,a->endOfRegion);
|
||||
pageid_t ret = a->nextPage;
|
||||
// Ensure the page is in buffer cache without accessing disk (this
|
||||
// sets it to clean and all zeros if the page is not in cache).
|
||||
// Hopefully, future reads will get a cache hit, and avoid going to
|
||||
// disk.
|
||||
|
||||
Page * p = loadUninitializedPage(xid, ret);
|
||||
releasePage(p);
|
||||
DEBUG("ret %lld\n",ret);
|
||||
(a->nextPage)++;
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
|
||||
pageid_t alloc_region_rid(int xid, void * ridp) {
|
||||
recordid rid = *(recordid*)ridp;
|
||||
RegionAllocConf_t conf;
|
||||
Tread(xid,rid,&conf);
|
||||
pageid_t ret = alloc_region(xid,&conf);
|
||||
DEBUG("{%lld <- alloc region extend}\n", conf.regionList.page);
|
||||
|
||||
Tset(xid,rid,&conf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void insertProbeIter(int NUM_ENTRIES)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue