How to catch errors like "readTs: 60534 less than minTs"


When my database has lots of reads/writes, I sometimes have the following error on queries:

unexpected error: rpc error: code = Unknown desc = : readTs: 60534 less than minTs: 60535 for key: "\x00\x00\rrelation_type\x02\x06\x01\x00\x00\x00\x00\x00\x00\x00\x01"

I’ve found that similar thread, that one, and also that related issue, but none say how to catch the error.

This error is not typed, so only way to know if I deal with this error and not another one would be to parse the error message, not efficient nor durable.

For other errors like y.ErrAborted I can test the error type and retry if needed.

How can I properly know when I’m in that case?

What you’ve suggested (parse the error message) is currently a sufficient way to deal with the error and retry.

Feel free to file a GitHub issue about making the error typed for better error handling.

Thx @dmai for your answer.
I’ll do that for now, but I’ll also open an issue.
Have a good day.

Issue posted.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.