[ 
https://issues.apache.org/jira/browse/PROTON-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16777861#comment-16777861
 ] 

Jiri Daněk commented on PROTON-985:
-----------------------------------

There is still some more things to do

Proton C: IOCP and epoll proactors are still feeding wall clock time to 
pn_transport_tick. I tested (with epoll) that changing system clock breaks 
heartbeating. The libuv proactor does use monotonic already.

Go: lgtm

Proton Ruby: On RHEL 7 with ruby 2.0.0p648, \{{Process::CLOCK_MONOTONIC}} is 
not yet available. Some sort of workarounds are possible. I'd rather not do 
something like this for the ruby binding: 
https://github.com/ruby-concurrency/concurrent-ruby/pull/258/files#diff-2a859a8062ebf87bb71dad07dcb9e416R18

Python: ???, since 3.3, there is 
[https://www.python.org/dev/peps/pep-0418/#time-monotonic,] on previous 
versions people suggest to use libffi/ctypes to talk to the system api. 
proton-core could abstract over this. Now there is such function in 
proton-proactor, \{{pn_proactor_now}}.

I'll create a jira and send a PR for IOCP and epoll update.

> Modify pn_transport_tick to explicitly use a monotonic clock, not wall clock 
> time
> ---------------------------------------------------------------------------------
>
>                 Key: PROTON-985
>                 URL: https://issues.apache.org/jira/browse/PROTON-985
>             Project: Qpid Proton
>          Issue Type: Improvement
>          Components: proton-c
>    Affects Versions: proton-0.10
>            Reporter: Ken Giusti
>            Assignee: Alan Conway
>            Priority: Major
>             Fix For: proton-c-0.27.0
>
>
> The timestamp argument to pn_transport_tick is a pn_timestamp_t.  
> pn_timestamp_t implies real time (wall clock) in that it's expressed as a 
> time value based on epoch.
> As seen in QPID-6698, using a real time value for that argument can lead to 
> problems if the real time is adjusted (eg.  timezone, daylight savings, 
> drift).
> Instead, pn_transport_tick should be passed a monotonic clock source - one 
> that does not reflect changes in real time.
> All documentation and examples should be updated accordingly.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to