cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.05k stars 3.8k forks source link

"could not find own replica" in proposeRaftCommand #2881

Closed mrtracy closed 9 years ago

mrtracy commented 9 years ago

In replica.proposeRaftCommand(), we return an error if the replica cannot find itself in the current range descriptor. This appears to occur whenever ranges are moved around by the rebalancer; however, it also appears that this error goes all the way back to the client, even though it should be a retryable error. Examples:

W1021 14:29:57.558601 22805 ts/db.go:97  error writing time series data: storage/replica.go:878: could not find own replica in descriptor
E1021 14:30:58.361377 22805 client/txn.go:304  failure aborting transaction: txn aborted "sql/executor.go:276 (*Executor).execStmt" id=ce7634b5 key="\xff\v\x02\v\x01\n1datablocks\x00\x01\v\x03" rw=true pri=35.78880594 iso=SERIALIZABLE stat=PENDING epo=0 ts=1445452197.542009354,0 orig=1445452197.542009354,0 max=1445452197.792009115,0; abort caused by: storage/replica.go:878: could not find own replica in descriptor

We should investigate whether or not this is a retryable error, and if it is we should change the error type being returned.

mrtracy commented 9 years ago

Related bug with the same route problem occurs in replica.requestLeaderLease()

tamird commented 9 years ago

@mrtracy is this fixed in #2894?

bdarnell commented 9 years ago

Yes it is