Skip to content
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

cacheutil: caching size estimate is not valid #89444

Closed
ajwerner opened this issue Oct 5, 2022 · 1 comment · Fixed by #96892
Closed

cacheutil: caching size estimate is not valid #89444

ajwerner opened this issue Oct 5, 2022 · 1 comment · Fixed by #96892
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@ajwerner
Copy link
Contributor

ajwerner commented Oct 5, 2022

Describe the problem

// Table version remains the same: update map, unlock, return.
const sizeOfEntry = int(unsafe.Sizeof(entry))
if err := c.boundAccount.Grow(ctx, int64(sizeOfEntry)); err != nil {

The const size there is always going to be 2 words. The value it points to may be much larger. In general, this whole scheme doesn't seem all that sound.

Jira issue: CRDB-20255

@ajwerner ajwerner added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Oct 5, 2022
@blathers-crl blathers-crl bot added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label Oct 5, 2022
@ajwerner
Copy link
Contributor Author

ajwerner commented Oct 5, 2022

While we're here, the warning is going to get very noisy. Instead this thing should use LRU or something and evict. If it's going to log, it should rate limit that logging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants