storage: always use TBIs in MVCCIncrementalIterator#82453
storage: always use TBIs in MVCCIncrementalIterator#82453craig[bot] merged 1 commit intocockroachdb:masterfrom
MVCCIncrementalIterator#82453Conversation
a0e1f1c to
7a42698
Compare
stevendanna
left a comment
There was a problem hiding this comment.
🎉 Nice. Left a couple of minor questions about the settings cleanup, but it otherwise LGTM.
7a42698 to
92fc192
Compare
92fc192 to
f01b43c
Compare
|
Hm, test failure revealed a snag here: TBIs may omit inline values. The only one who cares about inline values seems to be rangefeed catchup scans, but we have #69357 which suggests they should be removed. I think we'll need to remove support for inline values here. Most callers already enable TBIs, and thus may not see them. Alternatively, we'll need to disable TBIs when the caller requests inline values to be emitted. @irfansharif Do you know if any of the span config stuff needs to see inline values via rangefeeds? |
nvb
left a comment
There was a problem hiding this comment.
Reviewed 6 of 6 files at r1, 21 of 21 files at r2, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @erikgrinaker)
-- commits line 15 at r1:
What do you mean by "default-off" here? The default value for kv.rangefeed.catchup_scan_iterator_optimization.enabled was true in v22.1.
pkg/storage/mvcc_incremental_iterator.go line 171 at r2 (raw file):
useTBI := opts.StartTime.IsSet() if util.IsMetamorphicBuild() { useTBI = util.ConstantWithMetamorphicTestBool("mvcc-incremental-iter-tbi", true)
Do we like non-static metamorphic constants? In the past, we've switched away from them with changes like 4de8dd7.
Rolling the metamoprhic dice each time through this function does expand the testing state space, though that shouldn't make a difference in terms of test coverage with a read-only operation like MVCCIncrementalIterator, where all iterators are independent.
f01b43c to
be34c12
Compare
erikgrinaker
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @nvanbenschoten)
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
What do you mean by "default-off" here? The default value for
kv.rangefeed.catchup_scan_iterator_optimization.enabledwastruein v22.1.
Yeah, I got confused because we had an open issue to default it to off (which I even "fixed" over in #82450). It was indeed default-off in 22.1.
pkg/storage/mvcc_incremental_iterator.go line 171 at r2 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Do we like non-static metamorphic constants? In the past, we've switched away from them with changes like 4de8dd7.
Rolling the metamoprhic dice each time through this function does expand the testing state space, though that shouldn't make a difference in terms of test coverage with a read-only operation like
MVCCIncrementalIterator, where all iterators are independent.
Yeah, I was thinking that'd get more coverage for a single test suite run, so it'd be more likely to fail on e.g. local runs. But no strong opinion, I can move it to a global if that's preferred.
erikgrinaker
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @nvanbenschoten)
Previously, erikgrinaker (Erik Grinaker) wrote…
Yeah, I got confused because we had an open issue to default it to off (which I even "fixed" over in #82450). It was indeed default-off in 22.1.
s/off/on 🤦♂️ To be clear, it was default-on in 22.1. Man, I need to get some rest.
nvb
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @erikgrinaker and @nvanbenschoten)
pkg/storage/mvcc_incremental_iterator.go line 171 at r2 (raw file):
Rolling the metamoprhic dice each time through this function does expand the testing state space, ...
Man, missed opportunity to use the phrase "metaphoric metamorphic dice". Also missed opportunity to spell "metamorphic" correctly.
Anyway, since interleaving TBI and non-TBI iterators in the same test doesn't meaningfully expand test coverage, I think the global probably is preferred to avoid the log spam, like Steven mentioned in the referenced commit.
Turns out rangefeeds will panic if they encounter an inline value, because their (zero-valued) timestamp is below the rangefeed's resolved timestamp. So they can't have been in use by anyone. I opened #82552 to remove inline values from rangefeeds entirely, since we can't safely support them and their usefulness seems dubious at best. |
be34c12 to
1c146f1
Compare
erikgrinaker
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @nvanbenschoten)
pkg/storage/mvcc_incremental_iterator.go line 171 at r2 (raw file):
Yupyup, made it global.
metaphoric metamorphic dice
😀
There was a problem hiding this comment.
@irfansharif Do you know if any of the span config stuff needs to see inline values via rangefeeds?
I don't know off hand, we were pretty vanilla/cargo-culty in our use of rangefeeds and didn't bake in any inlining assumptions directly. Curious if anything breaks if removed.
EDIT: I see you're way ahead with #82552, never mind me.
1c146f1 to
41f8c76
Compare
This patch removes the `EnableTimeBoundIteratorOptimization` field from `MVCCIncrementalIterOptions`. All existing caller have defaulted to enabling these in 22.1. Time-bound iterators are now enabled if the caller provides `StartTime`, since we otherwise assume that we're iterating over the entire dataset. TBIs are always randomly enabled in metamorphic test builds. This also removes the following cluster settings which defaulted to `true` (none of which were considered public): * `kv.bulk_io_write.experimental_incremental_export_enabled` * `kv.bulk_io_write.revert_range_time_bound_iterator.enabled` * `kv.refresh_range.time_bound_iterators.enabled` The following RPC request fields have been retained and set to `true` as appropriate for compatibility with 22.1 nodes, but they have no effect on 22.2 nodes: * `ExportRequest.EnableTimeBoundIteratorOptimization` * `RevertRequest.EnableTimeBoundIteratorOptimization` The following `Export` callers did not enable TBIs, but will now have them enabled by default: * `kvclient.GetAllRevisions()` * `lease.getDescriptorsFromStoreForInterval()` * `schemafeed.fetchDescriptorsWithPriorityOverride()` Release note: None
41f8c76 to
d6eac90
Compare
|
TFTRs! bors r=dt,stevendanna,nvanbenschoten |
|
Build succeeded: |
This patch removes the
EnableTimeBoundIteratorOptimizationfield fromMVCCIncrementalIterOptions. All existing caller have defaulted toenabling these in 22.1. Time-bound iterators are now enabled if the
caller provides
StartTime, since we otherwise assume that we'reiterating over the entire dataset. TBIs are always randomly enabled in
metamorphic test builds.
This also removes the following cluster settings which defaulted to
true(none of which were considered public):kv.bulk_io_write.experimental_incremental_export_enabledkv.bulk_io_write.revert_range_time_bound_iterator.enabledkv.refresh_range.time_bound_iterators.enabledThe following RPC request fields have been retained and set to
trueasappropriate for compatibility with 22.1 nodes, but they have no effect
on 22.2 nodes:
ExportRequest.EnableTimeBoundIteratorOptimizationRevertRequest.EnableTimeBoundIteratorOptimizationThe following
Exportcallers did not enable TBIs, but will now havethem enabled by default:
kvclient.GetAllRevisions()lease.getDescriptorsFromStoreForInterval()schemafeed.fetchDescriptorsWithPriorityOverride()Resolves #82454.
Release note: None