We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5f223c commit 0aebfe9Copy full SHA for 0aebfe9
1 file changed
go/storage/mkvs/db/pathbadger/pathbadger.go
@@ -555,11 +555,11 @@ func (d *badgerNodeDB) Prune(version uint64) error {
555
556
// Delete data for all root types that cannot have children.
557
for _, rootType := range api.RootTypesWithPolicy(func(p *api.RootPolicy) bool { return p.NoChildRoots }) {
558
- // Delete all finalized nodes.
+ // Delete all finalized nodes for this version.
559
wtx := d.db.NewTransactionAt(versionToTs(version), false)
560
defer wtx.Discard()
561
562
- prefix := finalizedNodeKeyFmt.Encode(byte(rootType))
+ prefix := finalizedNodeKeyFmt.Encode(byte(rootType), encodeVersionKey(version))
563
it := wtx.NewIterator(badger.IteratorOptions{Prefix: prefix})
564
defer it.Close()
565
0 commit comments