lib/storage: metaindexRow use memroy more efficiently (#655)

due to memory align the metaindexRow structure use 64-byte pre object.
this commit changes the order of field, make metaindexRow use 56-byte pre
object.

Signed-off-by: Sasasu <su@sasasu.me>
This commit is contained in:
Sasasu 2020-07-28 00:02:53 +08:00 committed by GitHub
parent 865610a7c8
commit 5b81bdde39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,10 +16,6 @@ type metaindexRow struct {
// TSID is the first TSID in the corresponding index block.
TSID TSID
// BlockHeadersCount is the number of block headers
// in the given index block.
BlockHeadersCount uint32
// MinTimestamp is the minimum timestamp in the given index block.
MinTimestamp int64
@ -29,6 +25,10 @@ type metaindexRow struct {
// IndexBlockOffset is the offset of index block.
IndexBlockOffset uint64
// BlockHeadersCount is the number of block headers
// in the given index block.
BlockHeadersCount uint32
// IndexBlockSize is the size of compressed index block.
IndexBlockSize uint32
}