[ 
https://issues.apache.org/jira/browse/IGNITE-14911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Daschinsky updated IGNITE-14911:
-------------------------------------
    Description: 
Currently, in python thin client timeout values can be set in int and float.

1. Timeouts for sql and cache properties are set using int as milliseconds
2. Timeouts for tx and expiry policy can be set either in float (as seconds) 
and in int as milliseconds (not released yet)

But in python traditionally all timeouts are set using float and int as 
*seconds*. Milliseconds precision are achieved using fractions (f.e. 120 ms are 
set as 0.12)

We can solve this issue in many ways
1. Completely change to traditional way (and probably broke backward 
compatibility)
2. Change logic as for transactions for all timeouts with deprecation warning 
and with advice using only float.
3. Change logic for transaction or expiry_policy traditionally, for all others 
timeouts as in point 2. (This is not consitent)
4. Set all timeouts in ints and milliseconds (except for socket timeout in 
`Connection`) and optionally for ExpiryPolicy accept also `datetime.timedelta`. 


I suppose, that forth variant is the best option.

  was:
Currently, in python thin client timeout values can be set in int and float.

1. Timeouts for sql and cache properties are set using int as milliseconds
2. Timeouts for tx and expiry policy can be set either in float (as seconds) 
and in int as milliseconds (not released yet)

But in python traditionally all timeouts are set using float and int as 
*seconds*. Milliseconds precision are achieved using fractions (f.e. 120 ms are 
set as 0.12)

We can solve this issue in 2 ways
1. Completely change to traditional way (and probably broke backward 
compatibility)
2. Change logic as for transactions for all timeouts with deprecation warning 
and with advice using only float.
3. Change logic for transaction or expiry_policy traditionally, for all others 
timeouts as in point 2. (This is not consitent)


> Inconsistent and confused timeout properties in python thin client
> ------------------------------------------------------------------
>
>                 Key: IGNITE-14911
>                 URL: https://issues.apache.org/jira/browse/IGNITE-14911
>             Project: Ignite
>          Issue Type: Task
>          Components: python, thin client
>    Affects Versions: python-0.4.0
>            Reporter: Ivan Daschinsky
>            Assignee: Ivan Daschinsky
>            Priority: Blocker
>              Labels: python, thin
>             Fix For: python-0.5.0
>
>
> Currently, in python thin client timeout values can be set in int and float.
> 1. Timeouts for sql and cache properties are set using int as milliseconds
> 2. Timeouts for tx and expiry policy can be set either in float (as seconds) 
> and in int as milliseconds (not released yet)
> But in python traditionally all timeouts are set using float and int as 
> *seconds*. Milliseconds precision are achieved using fractions (f.e. 120 ms 
> are set as 0.12)
> We can solve this issue in many ways
> 1. Completely change to traditional way (and probably broke backward 
> compatibility)
> 2. Change logic as for transactions for all timeouts with deprecation warning 
> and with advice using only float.
> 3. Change logic for transaction or expiry_policy traditionally, for all 
> others timeouts as in point 2. (This is not consitent)
> 4. Set all timeouts in ints and milliseconds (except for socket timeout in 
> `Connection`) and optionally for ExpiryPolicy accept also 
> `datetime.timedelta`. 
> I suppose, that forth variant is the best option.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to