yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
8.96k stars 1.07k forks source link

Jepsen: NoHostAvailableException with a list of hosts tried should be treated as info/unknown instead of fail #846

Closed ttyusupov closed 5 years ago

ttyusupov commented 5 years ago

Currently, CQL client in YugaByte Jepsen tests treats NoHostAvailableException as definitely failed. But it Java driver can throw this exception with a list of hosts tried (for example: NoHostAvailableException: All host(s) tried for query failed (tried: n2/192.168.122.12:9042 (com.datastax.driver.core.exceptions.TransportException: [n2/192.168.122.12:9042] Connection has been closed)) in following scenario:

That means NoHostAvailableException with a list of hosts should be treated as :info (unknown) instead of :fail (definitely failed). We should only treat NoHostAvailableException as :fail when it has no host was tried in error message.

aphyr commented 5 years ago

Good catch, thanks!

ttyusupov commented 5 years ago

Commit: https://github.com/YugaByte/jepsen/commit/ed958c59015cf0660d38547dc7d7a3acd3041d7c