Skip to content

Commit

Permalink
db: set hideObsoletePoints for "boomerang" files
Browse files Browse the repository at this point in the history
We weren't setting this flag correctly When a shared file is ingested
by another store and then ingested back into the original store,
leading to an "out of order keys" error in `TestMetaTwoInstances`.

Informs #3174.
  • Loading branch information
RaduBerinde committed Dec 21, 2023
1 parent 639cd57 commit 817cf10
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions table_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,10 +545,11 @@ func (c *tableCacheShard) newIters(
rp = &tableCacheShardReaderProvider{c: c, file: file, dbOpts: dbOpts}
}

if provider.IsSharedForeign(objMeta) {
if objMeta.IsShared() && v.reader.Properties.GlobalSeqNum != 0 {
if tableFormat < sstable.TableFormatPebblev4 {
return nil, nil, errors.New("pebble: shared foreign sstable has a lower table format than expected")
return nil, nil, errors.New("pebble: shared ingested sstable has a lower table format than expected")
}
// The table is shared and ingested.
hideObsoletePoints = true
}
var categoryAndQoS sstable.CategoryAndQoS
Expand Down

0 comments on commit 817cf10

Please sign in to comment.