Skip to content

Flag to store a deep copy of the request body in the response - #1350

Merged
thomasht86 merged 3 commits into
vespa-engine:masterfrom
dainiusjocas:store-request-in-response
Sep 21, 2026
Merged

thomasht86 merged 3 commits into
vespa-engine:masterfrom
dainiusjocas:store-request-in-response

Conversation

@dainiusjocas

Copy link
Copy Markdown
Contributor

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

When replaying a lot of queries, it can be useful to be able to match the request with the response.
When replaying queries in async mode, maintaining the mapping is pretty tricky and needs monkey patching pyvespa library.

VespaResponse object already has a slot for the request_body.

This PR adds an option parameter, to save a deep copy of the request_body.

The downside is that with big requests bodies it causes increased memory usage.

@thomasht86
thomasht86 self-requested a review September 21, 2026 08:23

@thomasht86 thomasht86 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the contribution!
I understand the use case, and agree this is a useful parameter to add.

@thomasht86
thomasht86 merged commit 41ad97f into vespa-engine:master Sep 21, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants