Skip to content

Conversation

@zhang2014
Copy link
Member

@zhang2014 zhang2014 commented Dec 1, 2025

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

fix(query): fix stack overflow errors thrown during serialization

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@github-actions github-actions bot added the pr-bugfix this PR patches a bug in codebase label Dec 1, 2025
@zhang2014 zhang2014 requested a review from dqhl76 December 1, 2025 06:54
@zhang2014 zhang2014 marked this pull request as ready for review December 1, 2025 11:22
@zhang2014 zhang2014 merged commit ace8d8b into databendlabs:main Dec 1, 2025
93 checks passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

flatten_storage.insert(plan.get_id(), plan);
}

assert_eq!(flatten_storage.len(), 1);

Choose a reason for hiding this comment

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

P1 Badge Avoid panic when fragment payload is malformed

Deserialization now asserts flatten_storage.len() == 1, so any malformed or mismatched fragment payload (e.g., missing nodes, duplicate plan ids, or otherwise invalid network input) will panic the process instead of returning a serde error. Query fragments are received over Flight RPC, so a bad packet can now crash a node, whereas the prior derived serde implementation would surface a recoverable error. Consider returning a D::Error here instead of panicking.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix this PR patches a bug in codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants