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

sql/contention/txnidcache: reuse blocks in list, account for space #77220

Merged
merged 1 commit into from
Mar 7, 2022

Commits on Mar 4, 2022

  1. sql/contention/txnidcache: reuse blocks in list, account for space

    This change does two things to the txnidcache:
    1) It accounts for the space used by the fifo eviction list. Previously
       we'd use more than double the intended space. We should probably also
       subtrace out the size of the buffers we're currently filling and the
       channel we use to communicate them, but I'll leave that for later.
    2) It stops trying to compact the blocks. Compacting the blocks ends up
       being a good deal of overhead because we have to copy across every
       single message. Instead we can just append the block directly to the
       list. This does have the hazard of wasting a lot of space when the
       blocks are sparse. However, if the blocks are sparse, we know that the
       throughput is low, so it's fine.
    
    Resolves cockroachdb#76738
    
    Release justification: bug fixes and low-risk updates to new functionality
    
    Release note: None
    ajwerner authored and Azhng committed Mar 4, 2022
    Configuration menu
    Copy the full SHA
    7dd272a View commit details
    Browse the repository at this point in the history