Skip to content

Commit

Permalink
fix segmentation violation on compaction
Browse files Browse the repository at this point in the history
  • Loading branch information
Termina1 committed Aug 27, 2024
1 parent d6d26cb commit eee2447
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chotki.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ func (o *Options) SetDefaults() {
/*if len(key) != 10 {
return nil, nil
}*/
target := make([]byte, len(value))
copy(target, value)
id, rdt := OKeyIdRdt(key)
pma := PebbleMergeAdaptor{
id: id,
rdt: rdt,
vals: [][]byte{value},
vals: [][]byte{target},
}
return &pma, nil
},
Expand Down

0 comments on commit eee2447

Please sign in to comment.