Skip to content

Conversation

@ByteYue
Copy link
Contributor

@ByteYue ByteYue commented Jul 5, 2023

Proposed changes

The former logic would directly use read_context as segment iterator's _context _context = read_context;. But if it's invoked by schema change or compaction, it would pass one read_context whose stats is nullptr like the following picture.
image

Thus the following file cache statistics assignation would get one invalid address _read_options.io_ctx.file_cache_stats = &read_context->stats->file_cache_stats; which would be the offset for file_cache_stats in stats.

This pr would make the read_context->stats always valid to prevent such coredump.

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@ByteYue
Copy link
Contributor Author

ByteYue commented Jul 5, 2023

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

@Tanya-W Tanya-W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

PR approved by anyone and no changes requested.

@ByteYue ByteYue force-pushed the use_stats_when_not_query branch from e5a96ba to 64804df Compare July 5, 2023 11:55
@ByteYue
Copy link
Contributor Author

ByteYue commented Jul 5, 2023

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

clang-tidy review says "All clean, LGTM! 👍"

@morningman morningman added the dev/2.0.0 2.0.0 release label Jul 5, 2023
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jul 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

PR approved by at least one committer and no changes requested.

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xiaokang xiaokang merged commit 80be2bb into apache:master Jul 6, 2023
@xiaokang xiaokang added dev/2.0.0-merged and removed dev/2.0.0 2.0.0 release labels Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/2.0.0-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants