Skip to content

Commit a1bc642

Browse files
committed
sstable: remove filter name check when copying filter
This check is not correct, as the file we are copying can have a different filter policy than the level it's going to. I can reproduce a meta test failure on master. I am not sure why it only started failing now. Removing the check is ok because we are resetting `w.filter/w.filterBlock`, so it doesn't matter what it was initialized to.
1 parent 2874a42 commit a1bc642

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

sstable/colblk_writer.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,9 +1263,6 @@ func (w *RawColumnWriter) addDataBlock(b, sep []byte, bhp block.HandleWithProper
12631263
// by the sstable copier that can copy parts of an sstable to a new sstable,
12641264
// using CopySpan().
12651265
func (w *RawColumnWriter) copyFilter(filter []byte, filterName string) error {
1266-
if w.filterBlock != nil && filterName != w.filterBlock.policyName() {
1267-
return errors.Newf("mismatched filters %q vs %q", filterName, w.filterBlock.policyName())
1268-
}
12691266
w.filterBlock = copyFilterWriter{
12701267
origPolicyName: w.filterBlock.policyName(), origMetaName: w.filterBlock.metaName(), data: filter,
12711268
}

sstable/rowblk_writer.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,9 +1973,6 @@ func (w *RawRowWriter) copyProperties(props Properties) {
19731973

19741974
// copyFilter implements RawWriter.
19751975
func (w *RawRowWriter) copyFilter(filter []byte, filterName string) error {
1976-
if w.filter != nil && filterName != w.filter.policyName() {
1977-
return errors.Newf("mismatched filters %q vs %q", filterName, w.filter.policyName())
1978-
}
19791976
w.filter = copyFilterWriter{
19801977
origPolicyName: w.filter.policyName(), origMetaName: w.filter.metaName(), data: filter,
19811978
}

0 commit comments

Comments
 (0)