Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

additional and useless loop for each relation file when do ptrack_get_pagemapset query #12

Closed
Assignees
funny-falcon
Labels
enhancementNew feature or request
@vegebird

Description

@vegebird

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.

  1. 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;
  2. 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 beif (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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp