Retry query on serialization error.