You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello developers, it seems that I found an issue accidentally.
When do ptrack_get_pagemapset() query, this function will get all relation files and then retrieve each file to construct its page map information.
ptrack_filelist_getnext() is to get the next relation file's info, please notice this two lines (just consider only one segment file case)
ctx->bid.blocknum = 0;
ctx->relsize = fst.st_size / BLCKSZ;
ptrack_get_pagemapset() will do loop to check whether there're this block's update lsn or not, please notice the loop condition:
/* Stop traversal if there are no more segments */
if (ctx->bid.blocknum > ctx->relsize) { complete this segment to output, and get next relation file to loop }
Obviously, if (ctx->bid.blocknum > ctx->relsize) should be if (ctx->bid.blocknum + 1 >= ctx->relsize) ?
And another small question: maybe ctx->relsize will be better named blknums?
If I miss some points and this is not an issue, apology for my disturbance.
Regards,
Bird
The text was updated successfully, but these errors were encountered:
while (true)
{
/* Stop traversal if there are no more segments */
if (ctx->bid.blocknum > ctx->relsize)
{
/* We completed a segment and there is a bitmap to return */
if (pagemap.bitmap != NULL)
{
/* make tuple output */
**<------------------------- also need to get the next relation file ?**
}
else **<------------------------ remove the "else" ?**
{
/* We have just processed unchanged file, let's pick next */
if (ptrack_filelist_getnext(ctx) < 0)
SRF_RETURN_DONE(funcctx);
}
}
// do hash, get update lsn
ctx->bid.blocknum += 1;
}
vegebird
added a commit
to vegebird/ptrack
that referenced
this issue
Jan 26, 2022
Hello developers, it seems that I found an issue accidentally.
When do ptrack_get_pagemapset() query, this function will get all relation files and then retrieve each file to construct its page map information.
ctx->bid.blocknum = 0;
ctx->relsize = fst.st_size / BLCKSZ;
/* Stop traversal if there are no more segments */
if (ctx->bid.blocknum > ctx->relsize) { complete this segment to output, and get next relation file to loop }
Obviously, if (ctx->bid.blocknum > ctx->relsize) should be if (ctx->bid.blocknum + 1 >= ctx->relsize) ?
And another small question: maybe ctx->relsize will be better named blknums?
If I miss some points and this is not an issue, apology for my disturbance.
Regards,
Bird
The text was updated successfully, but these errors were encountered: