Skip to content

Commit 59b5ae4

Browse files
committed
update chunk data pack remove
1 parent e7348f5 commit 59b5ae4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

storage/store/chunk_data_packs_stored.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ func (ch *StoredChunkDataPacks) BatchRemove(chunkDataPackIDs []flow.Identifier,
8181
}
8282

8383
func (ch *StoredChunkDataPacks) batchRemove(chunkDataPackID flow.Identifier, rw storage.ReaderBatchWriter) error {
84-
storage.OnCommitSucceed(rw, func() {
85-
ch.byIDCache.Remove(chunkDataPackID)
86-
})
87-
return operation.RemoveChunkDataPack(rw.Writer(), chunkDataPackID)
84+
return ch.byIDCache.RemoveTx(rw, chunkDataPackID)
8885
}
8986

9087
// StoreChunkDataPacks stores multiple StoredChunkDataPacks cs in a batch.

0 commit comments

Comments
 (0)