-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
83757: kv/bulk: skip exact matches in SSTBatcher when ingestAll is true r=erikgrinaker a=stevendanna This changes the semantics of ingestAll to skip ingesting exact matches. We expect to see such exact matches when processing duplicate events from a tenant replication stream. Previously, such exact matches didn't cause a problem other than wasted work. However, recently a number of streaming tests are recently failing under race with stream_ingestion_processor_test.go:464: unexpected meta error flushing: addsstable [/Tenant/30/Table/3/1/52/2/1,/Tenant/30/Table/53/1/96/0/NULL): SST stats are incorrect: diff(given, actual) = [KeyBytes: 5924 != 5036 ValBytes: 3523 != 2989 ValCount: 395 != 321] When under race, AddSST re-calculates any MVCCStats sent to it. However, it does so using a different iterator than we do in SSTBatcher. The new iterators used during the check treats duplicates in the SST differently -- leading to a difference in the stats computation. The difference in iterator behaviour is arguable a bug (#83766); but since the duplicates serve no purpose, removing them during batching seems prudent. Fixes #83740 Fixes #83741 Fixes #83742 Release note: None Co-authored-by: Steven Danna <[email protected]>
- Loading branch information
Showing
7 changed files
with
247 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.