Skip to content

storage: AdminSplit using descriptor with ReplicaID zero #31918

@tbg

Description

@tbg

Got this failure:

--- FAIL: import/tpch/nodes=8 (9943.52s)
	test.go:639,cluster.go:1453,import.go:122: pq: split at key /Table/53/1/390157478/5 failed: replica 0 is invalid: ReplicaID must not be zero

This originates in

// Validate performs some basic validation of the contents of a replica descriptor.
func (r ReplicaDescriptor) Validate() error {
if r.NodeID == 0 {
return errors.Errorf("NodeID must not be zero")
}
if r.StoreID == 0 {
return errors.Errorf("StoreID must not be zero")
}
if r.ReplicaID == 0 {
return errors.Errorf("ReplicaID must not be zero")
}
return nil
}

So we have a replica that has a NodeID and StoreID but a zero replicaID either in

if err := updateRangeDescriptor(b, rightDescKey, nil, rightDesc); err != nil {

or in the other call to updateRangeDescriptor. I'm taking a look at the logs now. Doubtful that it's at all related to this change.

PS merges are turned off in this testing.

My best bet for this error is that

reply, lastErr = r.adminSplitWithDescriptor(ctx, args, r.Desc())
returns a descriptor with a replica that has a replica with replicaID zero.

Metadata

Metadata

Assignees

Labels

C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions