Skip to content

BlockStore method LoadBlock could also return metadata #1556

@mzabaluev

Description

@mzabaluev

The DB-backed implementation of the BlockStore interface provided by store performs LoadBlockMeta as part of retrieving block data. The retrieved metadata structure is discarded after its data is used. At a number of call sites, the caller also needs to retrieve the block metadata, which is performed by calling LoadBlockMeta directly, resulting in a second lookup in the metadata "table".

To eliminate redundancy, LoadBlock could return the metadata in a tuple. It's reasonable to expect that any other storage implementations either have a similar data model (as they also need to support LoadBlockPart), or can create the metadata structure cheaply from block data.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions