Skip to content

Fix small issues with parse state#1660

Merged
badrishc merged 5 commits into
devfrom
badrishc/fix-parse-state-dev
Apr 1, 2026
Merged

Fix small issues with parse state#1660
badrishc merged 5 commits into
devfrom
badrishc/fix-parse-state-dev

Conversation

@badrishc

@badrishc badrishc commented Apr 1, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings April 1, 2026 17:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to make parse-state growth safer and simpler by centralizing buffer resizing logic into SessionParseState, and using that from transaction key capture.

Changes:

  • Replaced manual transaction parse-state buffer growth with a call to EnsureCapacity.
  • Removed Capacity from SessionParseState and introduced EnsureCapacity(int) for resizing while preserving contents.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
libs/server/Transaction/TxnClusterSlotCheck.cs Uses centralized EnsureCapacity instead of manual resize/copy logic when saving key slices.
libs/server/Resp/Parser/SessionParseState.cs Removes Capacity and adds EnsureCapacity(int) to safely grow the argument buffer while preserving existing entries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread libs/server/Resp/Parser/SessionParseState.cs Outdated
Comment thread libs/server/Transaction/TxnClusterSlotCheck.cs
@badrishc badrishc merged commit ac72d34 into dev Apr 1, 2026
23 checks passed
@badrishc badrishc deleted the badrishc/fix-parse-state-dev branch April 1, 2026 20:46
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants