-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
storage: remove end-key comparison in ComputeStatsForRange #41899
Labels
C-performance
Perf of queries or internals. Solution not expected to change functional behavior.
T-storage
Storage Team
Comments
petermattis
added
the
C-performance
Perf of queries or internals. Solution not expected to change functional behavior.
label
Oct 24, 2019
petermattis
added a commit
to petermattis/cockroach
that referenced
this issue
Oct 24, 2019
`pebbleBatch.NewIterator` was setting `pebbleBatch.iter.inuse = true`, and then calling `pebbleIterator.init` which was clearing that field. This was broken by cockroachdb#41859 which refactored how `pebbleBatch` iterator reuse works. Added separate cached prefix and normal iterators to `pebble{Batch,ReadOnly}`. Various bits of higher-level code expect to be able to have a prefix and normal iterator open at the same time. In particularly, this comes up during intent resolution. This also mimics our usage of RocksDB which seems desirable in the short term even though the semantics of having two cached iterators is slightly odd. Fixes cockroachdb#41899
Oops, I specified the wrong issue to close in a PR. |
We have marked this issue as stale because it has been inactive for |
jbowens
changed the title
storage/engine: remove end-key comparison in ComputeStatsGo
storage: remove end-key comparison in ComputeStatsForRange
Jan 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-performance
Perf of queries or internals. Solution not expected to change functional behavior.
T-storage
Storage Team
On every iteration inside of the main loop in
ComputeStatsForRange
, a comparison is done against the end key. This is usually unnecessary as the iterator that has been passed toComputeStatsForRange
usually has had anUpperBound
set. The performance impact of removing this comparison is large:The challenge to removing it is that some uses of
ComputeStatsForRange
use iterators which don't have an upper-bound. For example,engine/bulk.AddSSTable
.Jira issue: CRDB-5409
The text was updated successfully, but these errors were encountered: