-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
json: properly report capacity of encoded jsons #25679
Conversation
b3c79fc
to
0f08aa7
Compare
Previously, jsonEncoded structs reported their memory size as including the underlying capacity of their encoded byte slices. This was incorrect, as usually that underlying slice is an entire kv batch. This problem led to significant overcounting of the memory used by queries that read JSON data from disk, which resulted in spurious BudgetExceededErrors. Release note (bug fix): prevent spurious BudgetExceededErrors for some queries that read a lot of JSON data from disk. Co-authored-by: Alfonso Subiotto Marqués <alfonso@cockroachlabs.com>
0f08aa7
to
23280f4
Compare
@jordanlewis any relationship to #25607, which doesn't use json? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@knz unfortunately not, those types seem to have correct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM although the tcl test failure is weird, any idea what's up with that?
Almost certainly a flake. Retriggered. |
TFTR! bors r+ |
25679: json: properly report capacity of encoded jsons r=jordanlewis a=jordanlewis Previously, jsonEncoded structs reported their memory size as including the underlying capacity of their encoded byte slices. This was incorrect, as usually that underlying slice is an entire kv batch. This problem led to significant overcounting of the memory used by queries that read JSON data from disk, which resulted in spurious BudgetExceededErrors. Release note (bug fix): prevent spurious BudgetExceededErrors for some queries that read a lot of JSON data from disk. Co-authored-by: Jordan Lewis <jordanthelewis@gmail.com>
Build succeeded |
25719: backport-2.0: json: properly report capacity of encoded jsons r=jordanlewis a=jordanlewis Backport 1/1 commits from #25679. /cc @cockroachdb/release Previously, jsonEncoded structs reported their memory size as including the underlying capacity of their encoded byte slices. This was incorrect, as usually that underlying slice is an entire kv batch. This problem led to significant overcounting of the memory used by queries that read JSON data from disk, which resulted in spurious BudgetExceededErrors. Release note (bug fix): prevent spurious BudgetExceededErrors for some queries that read a lot of JSON data from disk. Co-authored-by: Alfonso Subiotto Marqués <alfonso@cockroachlabs.com> Co-authored-by: Jordan Lewis <jordanthelewis@gmail.com>
Previously, jsonEncoded structs reported their memory size as including
the underlying capacity of their encoded byte slices. This was
incorrect, as usually that underlying slice is an entire kv batch. This
problem led to significant overcounting of the memory used by queries
that read JSON data from disk, which resulted in spurious
BudgetExceededErrors.
Release note (bug fix): prevent spurious BudgetExceededErrors for some
queries that read a lot of JSON data from disk.