2020-11-19 13:53:45 +00:00
|
|
|
package shard
|
|
|
|
|
|
|
|
import (
|
2023-03-07 13:38:26 +00:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor"
|
|
|
|
meta "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/metabase"
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/pilorama"
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/writecache"
|
2020-11-19 13:53:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Info groups the information about Shard.
|
|
|
|
type Info struct {
|
|
|
|
// Identifier of the shard.
|
|
|
|
ID *ID
|
|
|
|
|
2021-12-27 18:07:02 +00:00
|
|
|
// Shard mode.
|
2022-06-28 14:05:08 +00:00
|
|
|
Mode mode.Mode
|
2021-12-27 18:07:02 +00:00
|
|
|
|
2024-09-03 09:18:10 +00:00
|
|
|
// True when evacuation is in progress.
|
|
|
|
EvacuationInProgress bool
|
|
|
|
|
2020-11-19 13:53:45 +00:00
|
|
|
// Information about the metabase.
|
|
|
|
MetaBaseInfo meta.Info
|
|
|
|
|
|
|
|
// Information about the BLOB storage.
|
|
|
|
BlobStorInfo blobstor.Info
|
2020-11-19 15:04:09 +00:00
|
|
|
|
2020-12-01 09:26:19 +00:00
|
|
|
// Information about the Write Cache.
|
2021-12-20 10:03:06 +00:00
|
|
|
WriteCacheInfo writecache.Info
|
2020-12-01 09:26:19 +00:00
|
|
|
|
2022-01-31 15:23:19 +00:00
|
|
|
// ErrorCount contains amount of errors occurred in shard operations.
|
|
|
|
ErrorCount uint32
|
2022-05-16 13:23:09 +00:00
|
|
|
|
|
|
|
// PiloramaInfo contains information about trees stored on this shard.
|
|
|
|
PiloramaInfo pilorama.Info
|
2020-11-19 13:53:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// DumpInfo returns information about the Shard.
|
|
|
|
func (s *Shard) DumpInfo() Info {
|
|
|
|
return s.info
|
|
|
|
}
|