Skip to content

Conversation

paula-stacho
Copy link
Contributor

We already had a cap for strings. This PR adds cap for Binary and Code

Copy link
Member

@Anemy Anemy left a comment

Choose a reason for hiding this comment

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

lgtm! Left a question, not a blocker.


type.values.pushSome(
type.name === 'String' ? cropStringAt10kCharacters(value as string) : value
getCappedValue(type.bsonType, value)
Copy link
Member

Choose a reason for hiding this comment

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

A few lines up, there's the line

          type.values = bsonType === 'String'
            ? Reservoir(100) : Reservoir(10000);

Do we want to do that for binary and code as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that makes sense, will add

@paula-stacho paula-stacho merged commit 8244e00 into main Feb 6, 2025
20 checks passed
@paula-stacho paula-stacho deleted the COMPASS-8902 branch February 6, 2025 11:57
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