migration

package
v2.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AfterInitSteps

func AfterInitSteps(
	sharkyPath string,
	sharkyNoOfShards int,
	st transaction.Storage,
	logger log.Logger,
) migration.Steps

AfterInitSteps lists all migration steps for localstore IndexStore after the localstore is initiated.

func BeforeInitSteps added in v2.1.0

func BeforeInitSteps(st storage.BatchStore, logger log.Logger) migration.Steps

BeforeInitSteps lists all migration steps for localstore IndexStore before the localstore is initiated.

func RefCountSizeInc

func RefCountSizeInc(s storage.BatchStore, logger log.Logger) func() error

func ReserveRepairer added in v2.1.0

func ReserveRepairer(
	st transaction.Storage,
	chunkTypeFunc func(swarm.Chunk) swarm.ChunkType,
	logger log.Logger,
) func() error

ReserveRepairer is a migration step that removes all BinItem entries and migrates ChunkBinItem and BatchRadiusItem entries to use a new BinID field.

Types

type OldRetrievalIndexItem

type OldRetrievalIndexItem struct {
	Address   swarm.Address
	Timestamp uint64
	Location  sharky.Location
	RefCnt    uint8
}

OldRetrievalIndexItem is the index which gives us the sharky location from the swarm.Address. The RefCnt stores the reference of each time a Put operation is issued on this Address.

func (*OldRetrievalIndexItem) Clone

func (r *OldRetrievalIndexItem) Clone() storage.Item

func (*OldRetrievalIndexItem) ID

func (r *OldRetrievalIndexItem) ID() string

func (*OldRetrievalIndexItem) Marshal

func (r *OldRetrievalIndexItem) Marshal() ([]byte, error)

Stored in bytes as: |--Address(32)--|--Timestamp(8)--|--Location(7)--|--RefCnt(1)--|

func (OldRetrievalIndexItem) Namespace

func (OldRetrievalIndexItem) Namespace() string

func (OldRetrievalIndexItem) String

func (r OldRetrievalIndexItem) String() string

func (*OldRetrievalIndexItem) Unmarshal

func (r *OldRetrievalIndexItem) Unmarshal(buf []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL