diff --git a/pkg/storage/mvcc_history_test.go b/pkg/storage/mvcc_history_test.go index 64e3254ece9c..b3235305939d 100644 --- a/pkg/storage/mvcc_history_test.go +++ b/pkg/storage/mvcc_history_test.go @@ -69,15 +69,17 @@ import ( // initput [t=] [ts=[,]] [resolve [status=]] k= v= [raw] [failOnTombstones] // merge [t=] [ts=[,]] [resolve [status=]] k= v= [raw] // put [t=] [ts=[,]] [localTs=[,]] [resolve [status=]] k= v= [raw] -// put_rangekey ts=[,] [localTS=[,]] k= end= +// put_rangekey ts=[,] [localTs=[,]] k= end= // get [t=] [ts=[,]] [resolve [status=]] k= [inconsistent] [tombstones] [failOnMoreRecent] [localUncertaintyLimit=[,]] [globalUncertaintyLimit=[,]] // scan [t=] [ts=[,]] [resolve [status=]] k= [end=] [inconsistent] [tombstones] [reverse] [failOnMoreRecent] [localUncertaintyLimit=[,]] [globalUncertaintyLimit=[,]] [max=] [targetbytes=] [avoidExcess] [allowEmpty] // // iter_new [k=] [end=] [prefix] [kind=key|keyAndIntents] [types=pointsOnly|pointsWithRanges|pointsAndRanges|rangesOnly] [pointSynthesis [emitOnSeekGE]] [maskBelow=[,]] +// iter_new_incremental [k=] [end=] [startTs=[,]] [endTs=[,]] [types=pointsOnly|pointsWithRanges|pointsAndRanges|rangesOnly] [maskBelow=[,]] [intents=error|aggregate|emit] // iter_seek_ge k= [ts=[,]] // iter_seek_lt k= [ts=[,]] // iter_seek_intent_ge k= txn= // iter_next +// iter_next_ignoring_time // iter_next_key // iter_prev // iter_scan [reverse] @@ -396,6 +398,11 @@ func TestMVCCHistories(t *testing.T) { } // End of script. + // Check for any deferred iterator errors. + if foundErr == nil { + foundErr = e.iterErr() + } + if !trace { // If we were not tracing, no results were printed yet. Do it now. if txnChange || dataChange { @@ -497,14 +504,16 @@ var commands = map[string]cmd{ "put_rangekey": {typDataUpdate, cmdPutRangeKey}, "scan": {typReadOnly, cmdScan}, - "iter_new": {typReadOnly, cmdIterNew}, - "iter_seek_ge": {typReadOnly, cmdIterSeekGE}, - "iter_seek_lt": {typReadOnly, cmdIterSeekLT}, - "iter_seek_intent_ge": {typReadOnly, cmdIterSeekIntentGE}, - "iter_next": {typReadOnly, cmdIterNext}, - "iter_next_key": {typReadOnly, cmdIterNextKey}, - "iter_prev": {typReadOnly, cmdIterPrev}, - "iter_scan": {typReadOnly, cmdIterScan}, + "iter_new": {typReadOnly, cmdIterNew}, + "iter_new_incremental": {typReadOnly, cmdIterNewIncremental}, // MVCCIncrementalIterator + "iter_seek_ge": {typReadOnly, cmdIterSeekGE}, + "iter_seek_lt": {typReadOnly, cmdIterSeekLT}, + "iter_seek_intent_ge": {typReadOnly, cmdIterSeekIntentGE}, + "iter_next": {typReadOnly, cmdIterNext}, + "iter_next_ignoring_time": {typReadOnly, cmdIterNextIgnoringTime}, // MVCCIncrementalIterator + "iter_next_key": {typReadOnly, cmdIterNextKey}, + "iter_prev": {typReadOnly, cmdIterPrev}, + "iter_scan": {typReadOnly, cmdIterScan}, } func cmdTxnAdvance(e *evalCtx) error { @@ -1038,35 +1047,74 @@ func cmdIterNew(e *evalCtx) error { opts.RangeKeyMaskingBelow = e.getTsWithName("maskBelow") } - var r, closeReader Reader - rType := util.ConstantWithMetamorphicTestChoice( - fmt.Sprintf("iter-reader@%s", filepath.Base(e.td.Pos)), - "engine", "readonly", "batch", "snapshot").(string) - switch rType { - case "engine": - r = e.engine - case "readonly": - r = e.engine.NewReadOnly(StandardDurability) - case "batch": - r = e.engine.NewBatch() - closeReader = r - case "snapshot": - r = e.engine.NewSnapshot() - closeReader = r - default: - return errors.Errorf("unknown reader type %s", rType) - } - if e.iter != nil { e.iter.Close() } - e.iter = &iterWithCloseReader{ - MVCCIterator: r.NewMVCCIterator(kind, opts), - closeReader: closeReader, - } + + r, closer := metamorphicReader(e, "iter-reader") + e.iter = &iterWithCloser{r.NewMVCCIterator(kind, opts), closer} + if e.hasArg("pointSynthesis") { - e.iter = newPointSynthesizingIter(e.iter, e.hasArg("emitOnSeekGE")) + e.iter = newPointSynthesizingIter(e.mvccIter(), e.hasArg("emitOnSeekGE")) } + + return nil +} + +func cmdIterNewIncremental(e *evalCtx) error { + var opts MVCCIncrementalIterOptions + if e.hasArg("k") { + opts.StartKey, opts.EndKey = e.getKeyRange() + } + if len(opts.EndKey) == 0 { + opts.EndKey = keys.MaxKey + } + + opts.StartTime = e.getTsWithName("startTs") + opts.EndTime = e.getTsWithName("endTs") + if opts.EndTime.IsEmpty() { + opts.EndTime = hlc.MaxTimestamp + } + + if e.hasArg("types") { + var arg string + e.scanArg("types", &arg) + switch arg { + case "pointsOnly": + opts.KeyTypes = IterKeyTypePointsOnly + case "pointsAndRanges": + opts.KeyTypes = IterKeyTypePointsAndRanges + case "rangesOnly": + opts.KeyTypes = IterKeyTypeRangesOnly + default: + return errors.Errorf("unknown key type %s", arg) + } + } + if e.hasArg("maskBelow") { + opts.RangeKeyMaskingBelow = e.getTsWithName("maskBelow") + } + + if e.hasArg("intents") { + var arg string + e.scanArg("intents", &arg) + switch arg { + case "error": + opts.IntentPolicy = MVCCIncrementalIterIntentPolicyError + case "emit": + opts.IntentPolicy = MVCCIncrementalIterIntentPolicyEmit + case "aggregate": + opts.IntentPolicy = MVCCIncrementalIterIntentPolicyAggregate + default: + return errors.Errorf("unknown intent policy %s", arg) + } + } + + if e.iter != nil { + e.iter.Close() + } + + r, closer := metamorphicReader(e, "iter-incremental-reader") + e.iter = &iterWithCloser{NewMVCCIncrementalIterator(r, opts), closer} return nil } @@ -1083,7 +1131,7 @@ func cmdIterSeekIntentGE(e *evalCtx) error { var txnName string e.scanArg("txn", &txnName) txn := e.txns[txnName] - e.iter.SeekIntentGE(key, txn.ID) + e.mvccIter().SeekIntentGE(key, txn.ID) printIter(e) return nil } @@ -1091,7 +1139,7 @@ func cmdIterSeekIntentGE(e *evalCtx) error { func cmdIterSeekLT(e *evalCtx) error { key := e.getKey() ts := e.getTs(nil) - e.iter.SeekLT(MVCCKey{Key: key, Timestamp: ts}) + e.mvccIter().SeekLT(MVCCKey{Key: key, Timestamp: ts}) printIter(e) return nil } @@ -1102,6 +1150,12 @@ func cmdIterNext(e *evalCtx) error { return nil } +func cmdIterNextIgnoringTime(e *evalCtx) error { + e.mvccIncrementalIter().NextIgnoringTime() + printIter(e) + return nil +} + func cmdIterNextKey(e *evalCtx) error { e.iter.NextKey() printIter(e) @@ -1109,7 +1163,7 @@ func cmdIterNextKey(e *evalCtx) error { } func cmdIterPrev(e *evalCtx) error { - e.iter.Prev() + e.mvccIter().Prev() printIter(e) return nil } @@ -1124,7 +1178,7 @@ func cmdIterScan(e *evalCtx) error { return nil } if reverse { - e.iter.Prev() + e.mvccIter().Prev() } else { e.iter.Next() } @@ -1241,7 +1295,7 @@ type evalCtx struct { } ctx context.Context engine Engine - iter MVCCIterator + iter SimpleMVCCIterator t *testing.T td *datadriven.TestData txns map[string]*roachpb.Transaction @@ -1454,6 +1508,58 @@ func (e *evalCtx) lookupTxn(txnName string) (*roachpb.Transaction, error) { return txn, nil } +func (e *evalCtx) bareIter() SimpleMVCCIterator { + iter, ok := e.tryBareIter() + if !ok { + e.t.Fatalf("no iterator") + } + return iter +} + +func (e *evalCtx) tryBareIter() (SimpleMVCCIterator, bool) { + if iter := e.iter; iter == nil { + return nil, false + } else if i, ok := iter.(*iterWithCloser); ok { + return i.SimpleMVCCIterator, true + } else { + return iter, true + } +} + +func (e *evalCtx) mvccIter() MVCCIterator { + iter := e.bareIter() + mvccIter, ok := iter.(MVCCIterator) + if !ok { + e.t.Fatalf("%T does not implement MVCCIterator", iter) + } + return mvccIter +} + +func (e *evalCtx) mvccIncrementalIter() *MVCCIncrementalIterator { + iter := e.bareIter() + mvccIncrementalIter, ok := iter.(*MVCCIncrementalIterator) + if !ok { + e.t.Fatalf("%T is not MVCCIncrementalIterator", iter) + } + return mvccIncrementalIter +} + +func (e *evalCtx) iterErr() error { + iter, ok := e.tryBareIter() + if !ok { + return nil + } + if _, err := iter.Valid(); err != nil { + return err + } + if mvccIncrementalIter, ok := iter.(*MVCCIncrementalIterator); ok { + if err := mvccIncrementalIter.TryGetIntentError(); err != nil { + return err + } + } + return nil +} + func toKey(s string) roachpb.Key { if len(s) == 0 { return roachpb.Key(s) @@ -1498,16 +1604,38 @@ func toKey(s string) roachpb.Key { } } -// iterWithCloseReader will close the underlying reader when the -// iterator is closed. -type iterWithCloseReader struct { - MVCCIterator - closeReader Reader +// metamorphicReader returns a random storage.Reader for the Engine, and a +// closer function if the reader must be closed when done (nil otherwise). +func metamorphicReader(e *evalCtx, name string) (r Reader, closer func()) { + t := util.ConstantWithMetamorphicTestChoice(fmt.Sprintf("%s@%s", name, filepath.Base(e.td.Pos)), + "engine", "readonly", "batch", "snapshot").(string) + switch t { + case "engine": + return e.engine, nil + case "readonly": + return e.engine.NewReadOnly(StandardDurability), nil + case "batch": + batch := e.engine.NewBatch() + return batch, batch.Close + case "snapshot": + snapshot := e.engine.NewSnapshot() + return snapshot, snapshot.Close + default: + e.t.Fatalf("unknown reader type %q", t) + } + return nil, nil +} + +// iterWithCloser will call the given closer when the iterator +// is closed. +type iterWithCloser struct { + SimpleMVCCIterator + closer func() } -func (i *iterWithCloseReader) Close() { - i.MVCCIterator.Close() - if i.closeReader != nil { - i.closeReader.Close() +func (i *iterWithCloser) Close() { + i.SimpleMVCCIterator.Close() + if i.closer != nil { + i.closer() } } diff --git a/pkg/storage/mvcc_incremental_iterator.go b/pkg/storage/mvcc_incremental_iterator.go index 56f8f73ed812..2c28f9983bec 100644 --- a/pkg/storage/mvcc_incremental_iterator.go +++ b/pkg/storage/mvcc_incremental_iterator.go @@ -11,6 +11,8 @@ package storage import ( + "sort" + "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/storage/enginepb" "github.com/cockroachdb/cockroach/pkg/util" @@ -89,6 +91,25 @@ type MVCCIncrementalIterator struct { // regardless if they are metakeys. meta enginepb.MVCCMetadata + // hasPoint and hasRange control whether the iterator should surface a point + // or range key from the underlying iterator. If true, this implies that the + // underlying iterator returns true as well. This can be used to hide point or + // range keys where one key kind satisfies the time predicate but the other + // one doesn't. + hasPoint, hasRange bool + + // rangeKeysStart contains the last seen range key start bound. It is used + // to detect changes to range keys. + // + // TODO(erikgrinaker): This pattern keeps coming up, and involves one + // comparison for every covered point key. Consider exposing this from Pebble, + // who has presumably already done these comparisons, so we can avoid them. + rangeKeysStart roachpb.Key + + // ignoringTime is true if the iterator is currently ignoring time bounds, + // i.e. following a call to NextIgnoringTime(). + ignoringTime bool + // Configuration passed in MVCCIncrementalIterOptions. intentPolicy MVCCIncrementalIterIntentPolicy @@ -128,7 +149,9 @@ const ( // MVCCIncrementalIterOptions bundles options for NewMVCCIncrementalIterator. type MVCCIncrementalIterOptions struct { - EndKey roachpb.Key + KeyTypes IterKeyType + StartKey roachpb.Key + EndKey roachpb.Key // Only keys within (StartTime,EndTime] will be emitted. EndTime defaults to // hlc.MaxTimestamp. The time-bound iterator optimization will only be used if @@ -136,6 +159,13 @@ type MVCCIncrementalIterOptions struct { StartTime hlc.Timestamp EndTime hlc.Timestamp + // RangeKeyMaskingBelow will mask points keys covered by MVCC range tombstones + // below the given timestamp. For more details, see IterOptions. + // + // NB: This masking also affects NextIgnoringTime(), which cannot see points + // below MVCC range tombstones either. + RangeKeyMaskingBelow hlc.Timestamp + IntentPolicy MVCCIncrementalIterIntentPolicy } @@ -164,20 +194,36 @@ func NewMVCCIncrementalIterator( // An iterator without the timestamp hints is created to ensure that the // iterator visits every required version of every key that has changed. iter = reader.NewMVCCIterator(MVCCKeyAndIntentsIterKind, IterOptions{ - UpperBound: opts.EndKey, + KeyTypes: opts.KeyTypes, + LowerBound: opts.StartKey, + UpperBound: opts.EndKey, + RangeKeyMaskingBelow: opts.RangeKeyMaskingBelow, }) // The timeBoundIter is only required to see versioned keys, since the - // intents will be found by iter. + // intents will be found by iter. It can also always enable range key + // masking at the start time, since we never care about point keys below it + // (the same isn't true for the main iterator, since it would break + // NextIgnoringTime). + tbiRangeKeyMasking := opts.RangeKeyMaskingBelow + if tbiRangeKeyMasking.LessEq(opts.StartTime) && opts.KeyTypes == IterKeyTypePointsAndRanges { + tbiRangeKeyMasking = opts.StartTime.Next() + } timeBoundIter = reader.NewMVCCIterator(MVCCKeyIterKind, IterOptions{ + KeyTypes: opts.KeyTypes, + LowerBound: opts.StartKey, UpperBound: opts.EndKey, // The call to startTime.Next() converts our exclusive start bound into // the inclusive start bound that MinTimestampHint expects. - MinTimestampHint: opts.StartTime.Next(), - MaxTimestampHint: opts.EndTime, + MinTimestampHint: opts.StartTime.Next(), + MaxTimestampHint: opts.EndTime, + RangeKeyMaskingBelow: tbiRangeKeyMasking, }) } else { iter = reader.NewMVCCIterator(MVCCKeyAndIntentsIterKind, IterOptions{ - UpperBound: opts.EndKey, + KeyTypes: opts.KeyTypes, + LowerBound: opts.StartKey, + UpperBound: opts.EndKey, + RangeKeyMaskingBelow: opts.RangeKeyMaskingBelow, }) } @@ -208,11 +254,7 @@ func (i *MVCCIncrementalIterator) SeekGE(startKey MVCCKey) { } } i.iter.SeekGE(startKey) - if !i.updateValid() { - return - } - i.err = nil - i.valid = true + i.rangeKeysStart = nil i.advance() } @@ -227,9 +269,6 @@ func (i *MVCCIncrementalIterator) Close() { // Next implements SimpleMVCCIterator. func (i *MVCCIncrementalIterator) Next() { i.iter.Next() - if !i.updateValid() { - return - } i.advance() } @@ -237,20 +276,13 @@ func (i *MVCCIncrementalIterator) Next() { // returns true if valid. // gcassert:inline func (i *MVCCIncrementalIterator) updateValid() bool { - if ok, err := i.iter.Valid(); !ok { - i.err = err - i.valid = false - return false - } - return true + i.valid, i.err = i.iter.Valid() + return i.valid } // NextKey implements SimpleMVCCIterator. func (i *MVCCIncrementalIterator) NextKey() { i.iter.NextKey() - if !i.updateValid() { - return - } i.advance() } @@ -259,6 +291,11 @@ func (i *MVCCIncrementalIterator) NextKey() { // to the earliest version of the next candidate key. // It is expected (but not required) that TBI is at a key <= main iterator key // when calling maybeSkipKeys(). +// +// TODO(erikgrinaker): Make sure this works properly when TBIs handle range +// keys. In particular, we need to make sure a SeekGE doesn't get stuck +// prematurely on a bare range key that we've already emitted, but moves onto +// the next TBI point key (which can be much further ahead). func (i *MVCCIncrementalIterator) maybeSkipKeys() { if i.timeBoundIter == nil { // If there is no time bound iterator, we cannot skip any keys. @@ -387,12 +424,62 @@ func (i *MVCCIncrementalIterator) updateMeta() error { // intent with a timestamp within the incremental iterator's bounds when the // intent policy is MVCCIncrementalIterIntentPolicyError. func (i *MVCCIncrementalIterator) advance() { + i.ignoringTime = false for { + if !i.updateValid() { + return + } i.maybeSkipKeys() if !i.valid { return } + // NB: Don't update i.hasRange directly -- we only change it when + // i.rangeKeysStart changes, to avoid unnecessary checks. + hasPoint, hasRange := i.iter.HasPointAndRange() + i.hasPoint = hasPoint + + // Process range keys. + // + // TODO(erikgrinaker): This needs to be optimized. For example, range keys + // only change on unversioned keys (except after a SeekGE), which can save a + // bunch of comparisons here. HasPointAndRange() has also been seen to have + // a non-negligible cost even without any range keys. + var newRangeKey bool + if hasRange { + if rangeStart := i.iter.RangeBounds().Key; !rangeStart.Equal(i.rangeKeysStart) { + i.rangeKeysStart = append(i.rangeKeysStart[:0], rangeStart...) + // Find the first range key at or below EndTime. If that's also above + // StartTime then we have visible range keys. We use a linear search + // rather than a binary search because we expect EndTime to be near the + // current time, so the first range key will typically be sufficient. + hasRange = false + for _, rkv := range i.iter.RangeKeys() { + if ts := rkv.RangeKey.Timestamp; ts.LessEq(i.endTime) { + hasRange = i.startTime.Less(ts) + break + } + } + i.hasRange = hasRange + newRangeKey = hasRange + } + // else keep i.hasRange from last i.rangeKeysStart change. + } else { + i.hasRange = false + } + + // If we're on a visible, bare range key then we're done. If the range key + // isn't visible either, then we keep going. + if !i.hasPoint { + if !i.hasRange { + i.iter.Next() + continue + } + i.meta.Reset() + return + } + + // Process point keys. if err := i.updateMeta(); err != nil { return } @@ -406,14 +493,15 @@ func (i *MVCCIncrementalIterator) advance() { // intent. If it is outside our time bounds, it // will be filtered below. case MVCCIncrementalIterIntentPolicyError, MVCCIncrementalIterIntentPolicyAggregate: - // We have encountered an intent but it must lie - // outside the timestamp span (startTime, - // endTime] or we have aggregated it. In either - // case, we want to advance past it. - i.iter.Next() - if !i.updateValid() { + // We have encountered an intent but it must lie outside the timestamp + // span (startTime, endTime] or we have aggregated it. In either case, + // we want to advance past it, unless we're also on a new range key that + // must be emitted. + if newRangeKey { + i.hasPoint = false return } + i.iter.Next() continue } } @@ -421,8 +509,15 @@ func (i *MVCCIncrementalIterator) advance() { // Note that MVCC keys are sorted by key, then by _descending_ timestamp // order with the exception of the metakey (timestamp 0) being sorted // first. + // + // If we encountered a new range key on this position, then we must emit it + // even if the the point key should be skipped. This typically happens on a + // filtered intent or when seeking directly to a filtered point version. metaTimestamp := i.meta.Timestamp.ToTimestamp() - if i.endTime.Less(metaTimestamp) { + if newRangeKey { + i.hasPoint = i.startTime.Less(metaTimestamp) && metaTimestamp.LessEq(i.endTime) + return + } else if i.endTime.Less(metaTimestamp) { i.iter.Next() } else if metaTimestamp.LessEq(i.startTime) { i.iter.NextKey() @@ -431,9 +526,6 @@ func (i *MVCCIncrementalIterator) advance() { // done. break } - if !i.updateValid() { - return - } } } @@ -449,21 +541,61 @@ func (i *MVCCIncrementalIterator) UnsafeKey() MVCCKey { // HasPointAndRange implements SimpleMVCCIterator. func (i *MVCCIncrementalIterator) HasPointAndRange() (bool, bool) { - panic("not implemented") + return i.hasPoint && i.valid, i.hasRange && i.valid } // RangeBounds implements SimpleMVCCIterator. func (i *MVCCIncrementalIterator) RangeBounds() roachpb.Span { - panic("not implemented") + if !i.hasRange || !i.valid { + return roachpb.Span{} + } + return i.iter.RangeBounds() } // RangeKeys implements SimpleMVCCIterator. func (i *MVCCIncrementalIterator) RangeKeys() []MVCCRangeKeyValue { - panic("not implemented") + if !i.hasRange || !i.valid { + return []MVCCRangeKeyValue{} + } + + // TODO(erikgrinaker): It may be worthwhile to clone and memoize this result + // for the same range key. However, callers may avoid calling RangeKeys() + // unnecessarily, and we may optimize parent iterators, so let's measure. + rangeKeys := i.iter.RangeKeys() + + if i.ignoringTime { + return rangeKeys + } + + // Find the first range key at or below endTime, and truncate rangeKeys. We do + // a linear search rather than a binary search, because we expect endTime to + // be near the current time, so the first element will typically match. + first := len(rangeKeys) - 1 + for idx, rkv := range rangeKeys { + if rkv.RangeKey.Timestamp.LessEq(i.endTime) { + first = idx + break + } + } + rangeKeys = rangeKeys[first:] + + // Find the first range key at or below startTime, and truncate rangeKeys. + if i.startTime.IsSet() { + if idx := sort.Search(len(rangeKeys), func(idx int) bool { + return rangeKeys[idx].RangeKey.Timestamp.LessEq(i.startTime) + }); idx >= 0 { + rangeKeys = rangeKeys[:idx] + } + } + + return rangeKeys } // UnsafeValue implements SimpleMVCCIterator. func (i *MVCCIncrementalIterator) UnsafeValue() []byte { + if !i.hasPoint { + return nil + } return i.iter.UnsafeValue() } @@ -472,12 +604,26 @@ func (i *MVCCIncrementalIterator) UnsafeValue() []byte { // Intents in the time range (startTime,EndTime] are handled according to the // iterator policy. func (i *MVCCIncrementalIterator) NextIgnoringTime() { + i.ignoringTime = true for { i.iter.Next() if !i.updateValid() { return } + i.hasPoint, i.hasRange = i.iter.HasPointAndRange() + if i.hasRange { + // Make sure we update rangeKeysStart appropriately so that switching back + // to regular iteration won't emit bare range keys twice. + if rangeStart := i.iter.RangeBounds().Key; !rangeStart.Equal(i.rangeKeysStart) { + i.rangeKeysStart = append(i.rangeKeysStart[:0], rangeStart...) + } + } + + if !i.hasPoint { + return + } + if err := i.updateMeta(); err != nil { return } diff --git a/pkg/storage/mvcc_incremental_iterator_test.go b/pkg/storage/mvcc_incremental_iterator_test.go index fdffdc7d2bd8..d8a8666c536d 100644 --- a/pkg/storage/mvcc_incremental_iterator_test.go +++ b/pkg/storage/mvcc_incremental_iterator_test.go @@ -38,6 +38,9 @@ import ( "golang.org/x/sync/errgroup" ) +// See also tests in testdata/mvcc_histories/range_key_iter_incremental which +// cover iteration with range keys. + const all, latest = true, false func makeKVT(key roachpb.Key, value roachpb.Value, ts hlc.Timestamp) MVCCKeyValue { diff --git a/pkg/storage/testdata/mvcc_histories/range_key_iter_incremental b/pkg/storage/testdata/mvcc_histories/range_key_iter_incremental new file mode 100644 index 000000000000..857a52a2d54c --- /dev/null +++ b/pkg/storage/testdata/mvcc_histories/range_key_iter_incremental @@ -0,0 +1,1517 @@ +# Tests range key handling in MVCCIncrementalIterator. It does not support +# reverse iteration, as it does not implement MVCCIterator. +# +# Sets up the following dataset, where x is tombstone, o-o is range tombstone, [] is intent. +# +# 8 [d8] [m8] +# 7 [a7] [j7] [l7] [o7] +# 6 f6 +# 5 o---------------o k5 +# 4 x x d4 f4 g4 x +# 3 o-------o e3 o-------oh3 o---o +# 2 a2 f2 g2 +# 1 o---------------------------------------o +# a b c d e f g h i j k l m n o +# +run ok +put_rangekey k=a end=k ts=1 +put k=a ts=2 v=a2 +del k=a ts=4 +put_rangekey k=b end=d ts=3 +del k=b ts=4 +put k=d ts=4 v=d4 +put k=e ts=3 v=e3 +put k=f ts=2 v=f2 +put k=g ts=2 v=g2 +put_rangekey k=f end=h ts=3 +put k=f ts=4 v=f4 +put_rangekey k=c end=g ts=5 +put k=f ts=6 v=f6 +put k=g ts=4 v=g4 +put k=h ts=3 v=h3 +del k=h ts=4 +put k=k ts=5 v=k5 +put_rangekey k=m end=n ts=3 localTs=2 +with t=A + txn_begin ts=7 + put k=a v=a7 + put k=j v=j7 + put k=l v=l7 + put k=o v=o7 +with t=B + txn_begin ts=8 + put k=d v=d8 + put k=m v=m8 +---- +>> at end: +txn: "B" meta={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} lock=true stat=PENDING rts=8.000000000,0 wto=false gul=0,0 +rangekey: {a-b}/[1.000000000,0=/] +rangekey: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +rangekey: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +rangekey: {d-f}/[5.000000000,0=/ 1.000000000,0=/] +rangekey: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +rangekey: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +rangekey: {h-k}/[1.000000000,0=/] +rangekey: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +meta: "a"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +data: "a"/7.000000000,0 -> /BYTES/a7 +data: "a"/4.000000000,0 -> / +data: "a"/2.000000000,0 -> /BYTES/a2 +data: "b"/4.000000000,0 -> / +meta: "d"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +data: "d"/8.000000000,0 -> /BYTES/d8 +data: "d"/4.000000000,0 -> /BYTES/d4 +data: "e"/3.000000000,0 -> /BYTES/e3 +data: "f"/6.000000000,0 -> /BYTES/f6 +data: "f"/4.000000000,0 -> /BYTES/f4 +data: "f"/2.000000000,0 -> /BYTES/f2 +data: "g"/4.000000000,0 -> /BYTES/g4 +data: "g"/2.000000000,0 -> /BYTES/g2 +data: "h"/4.000000000,0 -> / +data: "h"/3.000000000,0 -> /BYTES/h3 +meta: "j"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +data: "j"/7.000000000,0 -> /BYTES/j7 +data: "k"/5.000000000,0 -> /BYTES/k5 +meta: "l"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +data: "l"/7.000000000,0 -> /BYTES/l7 +meta: "m"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +data: "m"/8.000000000,0 -> /BYTES/m8 +meta: "o"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +data: "o"/7.000000000,0 -> /BYTES/o7 + +# Iterate across the entire span for all key types. +run ok +iter_new_incremental types=pointsOnly intents=emit +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/7.000000000,0=/BYTES/a7 +iter_scan: "a"/4.000000000,0=/ +iter_scan: "a"/2.000000000,0=/BYTES/a2 +iter_scan: "b"/4.000000000,0=/ +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "d"/8.000000000,0=/BYTES/d8 +iter_scan: "d"/4.000000000,0=/BYTES/d4 +iter_scan: "e"/3.000000000,0=/BYTES/e3 +iter_scan: "f"/6.000000000,0=/BYTES/f6 +iter_scan: "f"/4.000000000,0=/BYTES/f4 +iter_scan: "f"/2.000000000,0=/BYTES/f2 +iter_scan: "g"/4.000000000,0=/BYTES/g4 +iter_scan: "g"/2.000000000,0=/BYTES/g2 +iter_scan: "h"/4.000000000,0=/ +iter_scan: "h"/3.000000000,0=/BYTES/h3 +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "j"/7.000000000,0=/BYTES/j7 +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "m"/8.000000000,0=/BYTES/m8 +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/7.000000000,0=/BYTES/a7 {a-b}/[1.000000000,0=/] +iter_scan: "a"/4.000000000,0=/ {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/8.000000000,0=/BYTES/d8 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/2.000000000,0=/BYTES/g2 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {h-k}/[1.000000000,0=/] +iter_scan: "j"/7.000000000,0=/BYTES/j7 {h-k}/[1.000000000,0=/] +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "m"/8.000000000,0=/BYTES/m8 {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=rangesOnly intents=emit +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {a-b}/[1.000000000,0=/] +iter_scan: {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: . + +# Iterate across the span while moving StartTime upwards. +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=1 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/7.000000000,0=/BYTES/a7 +iter_scan: "a"/4.000000000,0=/ +iter_scan: "a"/2.000000000,0=/BYTES/a2 +iter_scan: {b-c}/[3.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {d-f}/[5.000000000,0=/] +iter_scan: "d"/8.000000000,0=/BYTES/d8 {d-f}/[5.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 {f-g}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/] +iter_scan: "g"/2.000000000,0=/BYTES/g2 {g-h}/[3.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ +iter_scan: "h"/3.000000000,0=/BYTES/h3 +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "j"/7.000000000,0=/BYTES/j7 +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "m"/8.000000000,0=/BYTES/m8 {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=2 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/7.000000000,0=/BYTES/a7 +iter_scan: "a"/4.000000000,0=/ +iter_scan: {b-c}/[3.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {d-f}/[5.000000000,0=/] +iter_scan: "d"/8.000000000,0=/BYTES/d8 {d-f}/[5.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ +iter_scan: "h"/3.000000000,0=/BYTES/h3 +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "j"/7.000000000,0=/BYTES/j7 +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "m"/8.000000000,0=/BYTES/m8 {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=3 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/7.000000000,0=/BYTES/a7 +iter_scan: "a"/4.000000000,0=/ +iter_scan: "b"/4.000000000,0=/ +iter_scan: {c-d}/[5.000000000,0=/] +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {d-f}/[5.000000000,0=/] +iter_scan: "d"/8.000000000,0=/BYTES/d8 {d-f}/[5.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 +iter_scan: "h"/4.000000000,0=/ +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "j"/7.000000000,0=/BYTES/j7 +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "m"/8.000000000,0=/BYTES/m8 +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=4 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/7.000000000,0=/BYTES/a7 +iter_scan: {c-d}/[5.000000000,0=/] +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {d-f}/[5.000000000,0=/] +iter_scan: "d"/8.000000000,0=/BYTES/d8 {d-f}/[5.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/] +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "j"/7.000000000,0=/BYTES/j7 +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "m"/8.000000000,0=/BYTES/m8 +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=5 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/7.000000000,0=/BYTES/a7 +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "d"/8.000000000,0=/BYTES/d8 +iter_scan: "f"/6.000000000,0=/BYTES/f6 +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "j"/7.000000000,0=/BYTES/j7 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "m"/8.000000000,0=/BYTES/m8 +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=6 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/7.000000000,0=/BYTES/a7 +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "d"/8.000000000,0=/BYTES/d8 +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "j"/7.000000000,0=/BYTES/j7 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "m"/8.000000000,0=/BYTES/m8 +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=7 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "d"/8.000000000,0=/BYTES/d8 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "m"/8.000000000,0=/BYTES/m8 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=8 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: . +iter_scan: . + +# Iterate across the span while moving EndTime downwards. +run ok +iter_new_incremental types=pointsAndRanges intents=emit endTs=8 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/7.000000000,0=/BYTES/a7 {a-b}/[1.000000000,0=/] +iter_scan: "a"/4.000000000,0=/ {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/8.000000000,0=/BYTES/d8 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/2.000000000,0=/BYTES/g2 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {h-k}/[1.000000000,0=/] +iter_scan: "j"/7.000000000,0=/BYTES/j7 {h-k}/[1.000000000,0=/] +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "m"/8.000000000,0=/BYTES/m8 {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit endTs=7 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/7.000000000,0=/BYTES/a7 {a-b}/[1.000000000,0=/] +iter_scan: "a"/4.000000000,0=/ {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/2.000000000,0=/BYTES/g2 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {h-k}/[1.000000000,0=/] +iter_scan: "j"/7.000000000,0=/BYTES/j7 {h-k}/[1.000000000,0=/] +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit endTs=6 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {a-b}/[1.000000000,0=/] +iter_scan: {a-b}/[1.000000000,0=/] +iter_scan: "a"/4.000000000,0=/ {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/2.000000000,0=/BYTES/g2 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit endTs=5 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {a-b}/[1.000000000,0=/] +iter_scan: {a-b}/[1.000000000,0=/] +iter_scan: "a"/4.000000000,0=/ {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/2.000000000,0=/BYTES/g2 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit endTs=4 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {a-b}/[1.000000000,0=/] +iter_scan: {a-b}/[1.000000000,0=/] +iter_scan: "a"/4.000000000,0=/ {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {d-f}/[1.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[1.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[1.000000000,0=/] +iter_scan: {f-g}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 {f-g}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/2.000000000,0=/BYTES/g2 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit endTs=3 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {a-b}/[1.000000000,0=/] +iter_scan: {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {d-f}/[1.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[1.000000000,0=/] +iter_scan: {f-g}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 {f-g}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/2.000000000,0=/BYTES/g2 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit endTs=2 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {a-b}/[1.000000000,0=/] +iter_scan: {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[1.000000000,0=/] +iter_scan: {c-d}/[1.000000000,0=/] +iter_scan: {d-f}/[1.000000000,0=/] +iter_scan: {f-g}/[1.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 {f-g}/[1.000000000,0=/] +iter_scan: {g-h}/[1.000000000,0=/] +iter_scan: "g"/2.000000000,0=/BYTES/g2 {g-h}/[1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit endTs=1 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {a-b}/[1.000000000,0=/] +iter_scan: {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[1.000000000,0=/] +iter_scan: {c-d}/[1.000000000,0=/] +iter_scan: {d-f}/[1.000000000,0=/] +iter_scan: {f-g}/[1.000000000,0=/] +iter_scan: {g-h}/[1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: . + +# Run a scan of a single timestamp going upwards. +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=0 endTs=1 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {a-b}/[1.000000000,0=/] +iter_scan: {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[1.000000000,0=/] +iter_scan: {c-d}/[1.000000000,0=/] +iter_scan: {d-f}/[1.000000000,0=/] +iter_scan: {f-g}/[1.000000000,0=/] +iter_scan: {g-h}/[1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=1 endTs=2 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/2.000000000,0=/BYTES/a2 +iter_scan: "a"/2.000000000,0=/BYTES/a2 +iter_scan: "f"/2.000000000,0=/BYTES/f2 +iter_scan: "g"/2.000000000,0=/BYTES/g2 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=2 endTs=3 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {b-c}/[3.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/] +iter_scan: {c-d}/[3.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 +iter_scan: {f-g}/[3.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 +iter_scan: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=3 endTs=4 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/4.000000000,0=/ +iter_scan: "a"/4.000000000,0=/ +iter_scan: "b"/4.000000000,0=/ +iter_scan: "d"/4.000000000,0=/BYTES/d4 +iter_scan: "f"/4.000000000,0=/BYTES/f4 +iter_scan: "g"/4.000000000,0=/BYTES/g4 +iter_scan: "h"/4.000000000,0=/ +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=4 endTs=5 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {c-d}/[5.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/] +iter_scan: {d-f}/[5.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/] +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=5 endTs=6 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "f"/6.000000000,0=/BYTES/f6 +iter_scan: "f"/6.000000000,0=/BYTES/f6 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=6 endTs=7 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/7.000000000,0=/BYTES/a7 +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "j"/7.000000000,0=/BYTES/j7 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=7 endTs=8 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "d"/8.000000000,0=/BYTES/d8 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "m"/8.000000000,0=/BYTES/m8 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges intents=emit startTs=8 endTs=9 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: . +iter_scan: . + +# Bounded scan. +run ok +iter_new_incremental types=pointsAndRanges k=ccc end=fff intents=emit startTs=1 endTs=5 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {ccc-d}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: {ccc-d}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: {d-f}/[5.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/] +iter_scan: f{-ff}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 f{-ff}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 f{-ff}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: . + +# NextKey across span, unbounded and bounded. +run ok +iter_new_incremental types=pointsAndRanges intents=emit +iter_seek_ge k=a +iter_next_key +iter_next_key +iter_next_key +iter_next_key +iter_next_key +iter_next_key +iter_next_key +iter_next_key +iter_next_key +iter_next_key +iter_next_key +iter_next_key +iter_next_key +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_next_key: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_next_key: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_next_key: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_next_key: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_next_key: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_next_key: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_next_key: {h-k}/[1.000000000,0=/] +iter_next_key: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {h-k}/[1.000000000,0=/] +iter_next_key: "k"/5.000000000,0=/BYTES/k5 +iter_next_key: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_next_key: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_next_key: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_next_key: . + +run ok +iter_new_incremental types=pointsAndRanges k=ccc end=fff intents=emit startTs=1 endTs=5 +iter_seek_ge k=a +iter_next_key +iter_next_key +iter_next_key +iter_next_key +---- +iter_seek_ge: {ccc-d}/[5.000000000,0=/ 3.000000000,0=/] +iter_next_key: {d-f}/[5.000000000,0=/] +iter_next_key: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/] +iter_next_key: f{-ff}/[5.000000000,0=/ 3.000000000,0=/] +iter_next_key: . + +# Seek to every point location. +run ok +iter_new_incremental types=pointsAndRanges k=a end=z startTs=1 endTs=4 intents=emit +iter_seek_ge k=a +iter_seek_ge k=b +iter_seek_ge k=c +iter_seek_ge k=d +iter_seek_ge k=e +iter_seek_ge k=f +iter_seek_ge k=g +iter_seek_ge k=h +iter_seek_ge k=i +iter_seek_ge k=j +iter_seek_ge k=k +iter_seek_ge k=l +iter_seek_ge k=m +iter_seek_ge k=n +---- +iter_seek_ge: "a"/4.000000000,0=/ +iter_seek_ge: {b-c}/[3.000000000,0=/] +iter_seek_ge: {c-d}/[3.000000000,0=/] +iter_seek_ge: "d"/4.000000000,0=/BYTES/d4 +iter_seek_ge: "e"/3.000000000,0=/BYTES/e3 +iter_seek_ge: {f-g}/[3.000000000,0=/] +iter_seek_ge: {g-h}/[3.000000000,0=/] +iter_seek_ge: "h"/4.000000000,0=/ +iter_seek_ge: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_seek_ge: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_seek_ge: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_seek_ge: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_seek_ge: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_seek_ge: . + +# Seek to every point location above and below the filtered time span. +run ok +iter_new_incremental types=pointsAndRanges k=a end=z startTs=1 endTs=4 intents=emit +iter_seek_ge k=a ts=5 +iter_seek_ge k=b ts=5 +iter_seek_ge k=c ts=5 +iter_seek_ge k=d ts=5 +iter_seek_ge k=e ts=5 +iter_seek_ge k=f ts=5 +iter_seek_ge k=g ts=5 +iter_seek_ge k=h ts=5 +iter_seek_ge k=i ts=5 +iter_seek_ge k=j ts=5 +iter_seek_ge k=k ts=5 +iter_seek_ge k=l ts=5 +iter_seek_ge k=m ts=5 +iter_seek_ge k=n ts=5 +---- +iter_seek_ge: "a"/4.000000000,0=/ +iter_seek_ge: {b-c}/[3.000000000,0=/] +iter_seek_ge: {c-d}/[3.000000000,0=/] +iter_seek_ge: "d"/4.000000000,0=/BYTES/d4 +iter_seek_ge: "e"/3.000000000,0=/BYTES/e3 +iter_seek_ge: {f-g}/[3.000000000,0=/] +iter_seek_ge: {g-h}/[3.000000000,0=/] +iter_seek_ge: "h"/4.000000000,0=/ +iter_seek_ge: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_seek_ge: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_seek_ge: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_seek_ge: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_seek_ge: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_seek_ge: . + +run ok +iter_new_incremental types=pointsAndRanges k=a end=z startTs=3 endTs=6 intents=emit +iter_seek_ge k=a ts=3 +iter_seek_ge k=b ts=3 +iter_seek_ge k=c ts=3 +iter_seek_ge k=d ts=3 +iter_seek_ge k=e ts=3 +iter_seek_ge k=f ts=3 +iter_seek_ge k=g ts=3 +iter_seek_ge k=h ts=3 +iter_seek_ge k=i ts=3 +iter_seek_ge k=j ts=3 +iter_seek_ge k=k ts=3 +iter_seek_ge k=l ts=3 +iter_seek_ge k=m ts=3 +iter_seek_ge k=n ts=3 +---- +iter_seek_ge: "b"/4.000000000,0=/ +iter_seek_ge: {c-d}/[5.000000000,0=/] +iter_seek_ge: {c-d}/[5.000000000,0=/] +iter_seek_ge: {d-f}/[5.000000000,0=/] +iter_seek_ge: {d-f}/[5.000000000,0=/] +iter_seek_ge: {f-g}/[5.000000000,0=/] +iter_seek_ge: "h"/4.000000000,0=/ +iter_seek_ge: "k"/5.000000000,0=/BYTES/k5 +iter_seek_ge: "k"/5.000000000,0=/BYTES/k5 +iter_seek_ge: "k"/5.000000000,0=/BYTES/k5 +iter_seek_ge: . +iter_seek_ge: . +iter_seek_ge: . +iter_seek_ge: . + +# Seek directly to a hidden point, and then iterate forward. In particular, this +# tests that the bare range key is emitted first. +run ok +iter_new_incremental types=pointsAndRanges k=a end=z startTs=2 endTs=4 intents=emit +iter_seek_ge k=f ts=6 +iter_next +---- +iter_seek_ge: {f-g}/[3.000000000,0=/] +iter_next: "f"/4.000000000,0=/BYTES/f4 {f-g}/[3.000000000,0=/] + +# Seeking twice to within the same range key must emit the bare range key both +# times. +run ok +iter_new_incremental types=pointsAndRanges k=a end=z startTs=1 endTs=4 intents=emit +iter_seek_ge k=d +iter_seek_ge k=d ts=2 +iter_seek_ge k=e +---- +iter_seek_ge: "d"/4.000000000,0=/BYTES/d4 +iter_seek_ge: "e"/3.000000000,0=/BYTES/e3 +iter_seek_ge: "e"/3.000000000,0=/BYTES/e3 + +# Test intent error handling. +run error +iter_new_incremental types=pointsAndRanges k=a end=z intents=error +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: err=conflicting intents on "a" +iter_scan: err=conflicting intents on "a" +error: (*roachpb.WriteIntentError:) conflicting intents on "a" + +run error +iter_new_incremental types=pointsAndRanges k=a end=z intents=aggregate +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {a-b}/[1.000000000,0=/] +iter_scan: {a-b}/[1.000000000,0=/] +iter_scan: "a"/7.000000000,0=/BYTES/a7 {a-b}/[1.000000000,0=/] +iter_scan: "a"/4.000000000,0=/ {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/8.000000000,0=/BYTES/d8 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/2.000000000,0=/BYTES/g2 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: "j"/7.000000000,0=/BYTES/j7 {h-k}/[1.000000000,0=/] +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "m"/8.000000000,0=/BYTES/m8 {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . +error: (*roachpb.WriteIntentError:) conflicting intents on "a", "d", "j", "l", "m", "o" + +run error +iter_new_incremental types=pointsAndRanges k=a end=z endTs=7 intents=aggregate +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {a-b}/[1.000000000,0=/] +iter_scan: {a-b}/[1.000000000,0=/] +iter_scan: "a"/7.000000000,0=/BYTES/a7 {a-b}/[1.000000000,0=/] +iter_scan: "a"/4.000000000,0=/ {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/2.000000000,0=/BYTES/g2 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: "j"/7.000000000,0=/BYTES/j7 {h-k}/[1.000000000,0=/] +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . +error: (*roachpb.WriteIntentError:) conflicting intents on "a", "j", "l", "o" + +run ok +iter_new_incremental types=pointsAndRanges k=a end=z endTs=6 intents=aggregate +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {a-b}/[1.000000000,0=/] +iter_scan: {a-b}/[1.000000000,0=/] +iter_scan: "a"/4.000000000,0=/ {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/2.000000000,0=/BYTES/g2 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges k=e end=j intents=aggregate +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {e-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {e-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {e-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/2.000000000,0=/BYTES/g2 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-j}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-j}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-j}/[1.000000000,0=/] +iter_scan: . + +# Test that intents outside of time bounds won't error, and will be skipped +# instead. Within time bounds will error. +run ok +iter_new_incremental types=pointsAndRanges k=a end=z startTs=2 endTs=4 intents=error +iter_seek_ge k=c +iter_next_ignoring_time +---- +iter_seek_ge: {c-d}/[3.000000000,0=/] +iter_next_ignoring_time: "d"/8.000000000,0=/BYTES/d8 {d-f}/[5.000000000,0=/ 1.000000000,0=/] + +run error +iter_new_incremental types=pointsAndRanges k=a end=z startTs=2 endTs=10 intents=error +iter_seek_ge k=c +iter_next_ignoring_time +---- +iter_seek_ge: {c-d}/[5.000000000,0=/ 3.000000000,0=/] +iter_next_ignoring_time: err=conflicting intents on "d" +error: (*roachpb.WriteIntentError:) conflicting intents on "d" + +# rangesOnly doesn't care about intents. +run ok +iter_new_incremental types=rangesOnly k=a end=z intents=error +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {a-b}/[1.000000000,0=/] +iter_scan: {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: . + +# Test NextIgnoringTime(). +run ok +iter_new_incremental types=pointsAndRanges k=a end=z startTs=2 endTs=4 intents=emit +iter_seek_ge k=a +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +---- +iter_seek_ge: "a"/4.000000000,0=/ +iter_next_ignoring_time: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_next_ignoring_time: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: "d"/8.000000000,0=/BYTES/d8 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: "f"/2.000000000,0=/BYTES/f2 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: "g"/2.000000000,0=/BYTES/g2 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: {h-k}/[1.000000000,0=/] +iter_next_ignoring_time: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_next_ignoring_time: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_next_ignoring_time: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {h-k}/[1.000000000,0=/] +iter_next_ignoring_time: "j"/7.000000000,0=/BYTES/j7 {h-k}/[1.000000000,0=/] +iter_next_ignoring_time: "k"/5.000000000,0=/BYTES/k5 +iter_next_ignoring_time: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_next_ignoring_time: "l"/7.000000000,0=/BYTES/l7 +iter_next_ignoring_time: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_next_ignoring_time: "m"/8.000000000,0=/BYTES/m8 {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_next_ignoring_time: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_next_ignoring_time: "o"/7.000000000,0=/BYTES/o7 + +# Switch from ignoring to respecting time at point key. +run ok +iter_new_incremental types=pointsAndRanges k=a end=z startTs=2 endTs=4 intents=emit +iter_seek_ge k=a +iter_next_ignoring_time +iter_next +---- +iter_seek_ge: "a"/4.000000000,0=/ +iter_next_ignoring_time: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_next: {b-c}/[3.000000000,0=/] + +# Switch from ignoring to respecting time at range key. +run ok +iter_new_incremental types=pointsAndRanges k=a end=z startTs=2 endTs=4 intents=emit +iter_seek_ge k=a +iter_next +iter_next +iter_next_ignoring_time +iter_next +---- +iter_seek_ge: "a"/4.000000000,0=/ +iter_next: {b-c}/[3.000000000,0=/] +iter_next: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/] +iter_next_ignoring_time: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_next: "d"/4.000000000,0=/BYTES/d4 + +# NextIgnoringTime with only range keys. +run ok +iter_new_incremental types=rangesOnly k=a end=z startTs=4 endTs=5 intents=emit +iter_seek_ge k=f +iter_next_ignoring_time +---- +iter_seek_ge: {f-g}/[5.000000000,0=/] +iter_next_ignoring_time: {g-h}/[3.000000000,0=/ 1.000000000,0=/] + +# Try some scans, bounded and unbounded, with only point keys. +run ok +iter_new_incremental types=pointsOnly k=a end=z endTs=8 intents=emit +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "a"/7.000000000,0=/BYTES/a7 +iter_scan: "a"/4.000000000,0=/ +iter_scan: "a"/2.000000000,0=/BYTES/a2 +iter_scan: "b"/4.000000000,0=/ +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "d"/8.000000000,0=/BYTES/d8 +iter_scan: "d"/4.000000000,0=/BYTES/d4 +iter_scan: "e"/3.000000000,0=/BYTES/e3 +iter_scan: "f"/6.000000000,0=/BYTES/f6 +iter_scan: "f"/4.000000000,0=/BYTES/f4 +iter_scan: "f"/2.000000000,0=/BYTES/f2 +iter_scan: "g"/4.000000000,0=/BYTES/g4 +iter_scan: "g"/2.000000000,0=/BYTES/g2 +iter_scan: "h"/4.000000000,0=/ +iter_scan: "h"/3.000000000,0=/BYTES/h3 +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "j"/7.000000000,0=/BYTES/j7 +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "m"/8.000000000,0=/BYTES/m8 +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsOnly k=bbb end=fff startTs=2 endTs=5 intents=emit +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "d"/4.000000000,0=/BYTES/d4 +iter_scan: "d"/4.000000000,0=/BYTES/d4 +iter_scan: "e"/3.000000000,0=/BYTES/e3 +iter_scan: "f"/4.000000000,0=/BYTES/f4 +iter_scan: . + +run ok +iter_new_incremental types=pointsOnly k=a end=z endTs=8 intents=emit +iter_seek_ge k=a +iter_seek_ge k=b +iter_seek_ge k=c +iter_seek_ge k=d +iter_seek_ge k=e +iter_seek_ge k=f +iter_seek_ge k=g +iter_seek_ge k=h +iter_seek_ge k=i +iter_seek_ge k=j +iter_seek_ge k=k +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_seek_ge: "b"/4.000000000,0=/ +iter_seek_ge: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_seek_ge: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_seek_ge: "e"/3.000000000,0=/BYTES/e3 +iter_seek_ge: "f"/6.000000000,0=/BYTES/f6 +iter_seek_ge: "g"/4.000000000,0=/BYTES/g4 +iter_seek_ge: "h"/4.000000000,0=/ +iter_seek_ge: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_seek_ge: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_seek_ge: "k"/5.000000000,0=/BYTES/k5 + +run ok +iter_new_incremental types=pointsOnly k=a end=z endTs=8 intents=emit +iter_seek_ge k=f ts=7 +iter_seek_ge k=f ts=6 +iter_seek_ge k=f ts=5 +iter_seek_ge k=f ts=4 +iter_seek_ge k=f ts=3 +iter_seek_ge k=f ts=2 +iter_seek_ge k=f ts=1 +---- +iter_seek_ge: "f"/6.000000000,0=/BYTES/f6 +iter_seek_ge: "f"/6.000000000,0=/BYTES/f6 +iter_seek_ge: "f"/4.000000000,0=/BYTES/f4 +iter_seek_ge: "f"/4.000000000,0=/BYTES/f4 +iter_seek_ge: "f"/2.000000000,0=/BYTES/f2 +iter_seek_ge: "f"/2.000000000,0=/BYTES/f2 +iter_seek_ge: "g"/4.000000000,0=/BYTES/g4 + +# Try some scans, bounded and unbounded, with only range keys. +run ok +iter_new_incremental types=rangesOnly k=a end=z endTs=8 intents=emit +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {a-b}/[1.000000000,0=/] +iter_scan: {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: . + +run ok +iter_new_incremental types=rangesOnly k=bbb end=fff startTs=2 endTs=5 intents=emit +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: {bbb-c}/[3.000000000,0=/] +iter_scan: {bbb-c}/[3.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: {d-f}/[5.000000000,0=/] +iter_scan: f{-ff}/[5.000000000,0=/ 3.000000000,0=/] +iter_scan: . + +run ok +iter_new_incremental types=rangesOnly k=a end=z endTs=8 intents=emit +iter_seek_ge k=a +iter_seek_ge k=b +iter_seek_ge k=c +iter_seek_ge k=d +iter_seek_ge k=e +iter_seek_ge k=f +iter_seek_ge k=g +iter_seek_ge k=h +iter_seek_ge k=i +iter_seek_ge k=j +iter_seek_ge k=k +---- +iter_seek_ge: {a-b}/[1.000000000,0=/] +iter_seek_ge: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_seek_ge: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_seek_ge: {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_seek_ge: {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_seek_ge: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_seek_ge: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_seek_ge: {h-k}/[1.000000000,0=/] +iter_seek_ge: {h-k}/[1.000000000,0=/] +iter_seek_ge: {h-k}/[1.000000000,0=/] +iter_seek_ge: {m-n}/[3.000000000,0={localTs=2.000000000,0}/] + +run ok +iter_new_incremental types=rangesOnly k=a end=z endTs=8 intents=emit +iter_seek_ge k=f ts=7 +iter_seek_ge k=f ts=6 +iter_seek_ge k=f ts=5 +iter_seek_ge k=f ts=4 +iter_seek_ge k=f ts=3 +iter_seek_ge k=f ts=2 +iter_seek_ge k=f ts=1 +---- +iter_seek_ge: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_seek_ge: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_seek_ge: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_seek_ge: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_seek_ge: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_seek_ge: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_seek_ge: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] + +# Range key masking at increasing timestamps. +run ok +iter_new_incremental types=pointsAndRanges k=a end=z intents=emit maskBelow=1 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/7.000000000,0=/BYTES/a7 {a-b}/[1.000000000,0=/] +iter_scan: "a"/4.000000000,0=/ {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/8.000000000,0=/BYTES/d8 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/2.000000000,0=/BYTES/g2 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {h-k}/[1.000000000,0=/] +iter_scan: "j"/7.000000000,0=/BYTES/j7 {h-k}/[1.000000000,0=/] +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "m"/8.000000000,0=/BYTES/m8 {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges k=a end=z intents=emit maskBelow=2 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/7.000000000,0=/BYTES/a7 {a-b}/[1.000000000,0=/] +iter_scan: "a"/4.000000000,0=/ {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/8.000000000,0=/BYTES/d8 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/2.000000000,0=/BYTES/f2 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/2.000000000,0=/BYTES/g2 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {h-k}/[1.000000000,0=/] +iter_scan: "j"/7.000000000,0=/BYTES/j7 {h-k}/[1.000000000,0=/] +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "m"/8.000000000,0=/BYTES/m8 {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges k=a end=z intents=emit maskBelow=3 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/7.000000000,0=/BYTES/a7 {a-b}/[1.000000000,0=/] +iter_scan: "a"/4.000000000,0=/ {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/8.000000000,0=/BYTES/d8 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {h-k}/[1.000000000,0=/] +iter_scan: "j"/7.000000000,0=/BYTES/j7 {h-k}/[1.000000000,0=/] +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "m"/8.000000000,0=/BYTES/m8 {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges k=a end=z intents=emit maskBelow=4 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/7.000000000,0=/BYTES/a7 {a-b}/[1.000000000,0=/] +iter_scan: "a"/4.000000000,0=/ {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/8.000000000,0=/BYTES/d8 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/4.000000000,0=/BYTES/d4 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "e"/3.000000000,0=/BYTES/e3 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/4.000000000,0=/BYTES/f4 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {h-k}/[1.000000000,0=/] +iter_scan: "j"/7.000000000,0=/BYTES/j7 {h-k}/[1.000000000,0=/] +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "m"/8.000000000,0=/BYTES/m8 {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges k=a end=z intents=emit maskBelow=5 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/7.000000000,0=/BYTES/a7 {a-b}/[1.000000000,0=/] +iter_scan: "a"/4.000000000,0=/ {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/8.000000000,0=/BYTES/d8 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {h-k}/[1.000000000,0=/] +iter_scan: "j"/7.000000000,0=/BYTES/j7 {h-k}/[1.000000000,0=/] +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "m"/8.000000000,0=/BYTES/m8 {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +run ok +iter_new_incremental types=pointsAndRanges k=a end=z intents=emit maskBelow=6 +iter_seek_ge k=a +iter_scan +---- +iter_seek_ge: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {a-b}/[1.000000000,0=/] +iter_scan: "a"/7.000000000,0=/BYTES/a7 {a-b}/[1.000000000,0=/] +iter_scan: "a"/4.000000000,0=/ {a-b}/[1.000000000,0=/] +iter_scan: "a"/2.000000000,0=/BYTES/a2 {a-b}/[1.000000000,0=/] +iter_scan: {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "b"/4.000000000,0=/ {b-c}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {c-d}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: "d"/8.000000000,0=/BYTES/d8 {d-f}/[5.000000000,0=/ 1.000000000,0=/] +iter_scan: {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_scan: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_scan: {h-k}/[1.000000000,0=/] +iter_scan: "h"/4.000000000,0=/ {h-k}/[1.000000000,0=/] +iter_scan: "h"/3.000000000,0=/BYTES/h3 {h-k}/[1.000000000,0=/] +iter_scan: "j"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {h-k}/[1.000000000,0=/] +iter_scan: "j"/7.000000000,0=/BYTES/j7 {h-k}/[1.000000000,0=/] +iter_scan: "k"/5.000000000,0=/BYTES/k5 +iter_scan: "l"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "l"/7.000000000,0=/BYTES/l7 +iter_scan: "m"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=8.000000000,0 min=0,0 seq=0} ts=8.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "m"/8.000000000,0=/BYTES/m8 {m-n}/[3.000000000,0={localTs=2.000000000,0}/] +iter_scan: "o"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=7.000000000,0 min=0,0 seq=0} ts=7.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true +iter_scan: "o"/7.000000000,0=/BYTES/o7 +iter_scan: . + +# Range key masking also affects NextIgnoringTime. +run ok +iter_new_incremental types=pointsAndRanges k=a end=z intents=emit startTs=3 maskBelow=5 +iter_seek_ge k=f +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +iter_next_ignoring_time +---- +iter_seek_ge: {f-g}/[5.000000000,0=/] +iter_next_ignoring_time: "f"/6.000000000,0=/BYTES/f6 {f-g}/[5.000000000,0=/ 3.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: "g"/4.000000000,0=/BYTES/g4 {g-h}/[3.000000000,0=/ 1.000000000,0=/] +iter_next_ignoring_time: {h-k}/[1.000000000,0=/] diff --git a/pkg/storage/testdata/mvcc_histories/range_key_iter_intent_without_provisional_norace b/pkg/storage/testdata/mvcc_histories/range_key_iter_intent_without_provisional_norace index 21499145cbd7..ed887f40e435 100644 --- a/pkg/storage/testdata/mvcc_histories/range_key_iter_intent_without_provisional_norace +++ b/pkg/storage/testdata/mvcc_histories/range_key_iter_intent_without_provisional_norace @@ -48,42 +48,46 @@ error: (*withstack.withStack:) intentIter should not be after iter # Seeking to intent at c will error, due to best-effort checks for provisional # value. -run ok +run error iter_new types=pointsAndRanges iter_seek_ge k=c ---- iter_seek_ge: err=iter not on provisional value for intent "c" +error: (*withstack.withStack:) iter not on provisional value for intent "c" # Seeking to e intent will not error immediately, because the best-effort checks # only look for a point key covered by a range key (which it finds at f@1). This # is fine, as long as we expose the correct range key. The next step will error. -run ok +run error iter_new types=pointsAndRanges iter_seek_ge k=e iter_next ---- iter_seek_ge: "e"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=5.000000000,0 min=0,0 seq=0} ts=5.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {e-g}/[5.000000000,0=/] iter_next: err=intentIter at intent, but iter not at provisional value +error: (*withstack.withStack:) intentIter at intent, but iter not at provisional value # With prefix iterators, both seeks immediately error. -run ok +run error iter_new prefix types=pointsAndRanges iter_seek_ge k=c iter_seek_ge k=e ---- iter_seek_ge: err=iter not on provisional value for intent "c" iter_seek_ge: err=iter not on provisional value for intent "e" +error: (*withstack.withStack:) iter not on provisional value for intent "e" # Reverse seek at f will land on intent at e, even though there was no # provisional value. This is fine, as long as we emit the correct range keys. # It eventually errors because -run ok +run error iter_new types=pointsAndRanges iter_seek_lt k=f iter_prev ---- iter_seek_lt: "e"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=5.000000000,0 min=0,0 seq=0} ts=5.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {e-g}/[5.000000000,0=/] iter_prev: err=intentIter should not be after iter +error: (*withstack.withStack:) intentIter should not be after iter # Reverse seek at d ends up succeeding. This is also fine, as long as the # emitted range keys and values are correct. @@ -99,13 +103,14 @@ iter_prev: . # Switching directions on these positions should also error if appropriate, and # never expose the wrong range key for an intent. -run ok +run error iter_new types=pointsAndRanges iter_seek_ge k=e iter_prev ---- iter_seek_ge: "e"/0,0=txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=5.000000000,0 min=0,0 seq=0} ts=5.000000000,0 del=false klen=12 vlen=7 mergeTs= txnDidNotUpdateMeta=true {e-g}/[5.000000000,0=/] iter_prev: err=iter not at provisional value, cmp: -1 +error: (*withstack.withStack:) iter not at provisional value, cmp: -1 run ok iter_new types=pointsAndRanges