Check if this target has a metadata for the received CT
(req *stageNtfn, ct *cluster.CT)
| 241 | |
| 242 | // Check if this target has a metadata for the received CT |
| 243 | func (reb *Reb) detectLocalCT(req *stageNtfn, ct *cluster.CT) (*ec.Metadata, error) { |
| 244 | if req.action == rebActMoveCT { |
| 245 | // internal CT move after slice conflict - save always |
| 246 | return nil, nil |
| 247 | } |
| 248 | if _, ok := req.md.Daemons[reb.t.SID()]; !ok { |
| 249 | return nil, nil |
| 250 | } |
| 251 | mdCT, err := cluster.NewCTFromBO(ct.Bck().Bucket(), ct.ObjectName(), reb.t.Bowner(), fs.ECMetaType) |
| 252 | if err != nil { |
| 253 | return nil, err |
| 254 | } |
| 255 | locMD, err := ec.LoadMetadata(mdCT.FQN()) |
| 256 | if err != nil && os.IsNotExist(err) { |
| 257 | err = nil |
| 258 | } |
| 259 | return locMD, err |
| 260 | } |
| 261 | |
| 262 | // When a target receives a slice and the target has a slice with different ID: |
| 263 | // - move slice to a workfile directory |
no test coverage detected