tarantool / tarantool-php

PECL PHP driver for Tarantool
http://tarantool.org/
Other
86 stars 24 forks source link

Give meaningful error when retry_count is zero #166

Closed Totktonada closed 4 years ago

Totktonada commented 4 years ago

Clarified docs about this setting.

There may be a confusion whether the setting means overall amount of connection attempts or amount after the initial unsuccessful attempt. Usually a retries amount option means the latter, but here it means the former.

Decided to don't change behaviour or the setting name to provide perfect backward compatibility, but give meaningful error and clarify docs. See the discussion in 1.

Fixes #83

Totktonada commented 4 years ago

BTW, I checked what ini_set() do on an incorrect value (say, when OnUpdateLongGEZero is used in STD_PHP_INI_ENTRY and -1 is passed as the new value) and it just returns false: no exception is raised. I guess we should not raise an exception from the method, so I have added the check into the code that perform a connection.

Totktonada commented 4 years ago

Updated to support tarantool-1.6 in tests.