[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn_io_sleep_for_timestamps not sleeping long enough

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Mon, 24 Mar 2014 18:47:53 +0000

Julian Foad <julianfoad_at_btopenworld.com> writes:

> Philip Martin wrote:
>
>> Julian Foad writes:
>>>>   Modify: 2014-03-24 16:40:17.566569826 +0000
>>>>   Modify: 2014-03-24 16:40:17.570569785 +0000
>>>
>>> Is it possible to query the system clock resolution at run time? That
>>> would seem best.
>>
>> I believe the system clock resolution is different from the filesystem
>> resolution.
>
> Correct. We need to know both to perform an optimal sleep.

I don't think the clock resolution tells us much. When I try:

  echo x>f && date +'%F %T.%N' && echo y>g && date +'%F %T.%N' && stat f g | grep Modify

I sometimes get output like:

  2014-03-24 18:38:41.600661633
  2014-03-24 18:38:41.601409267
  Modify: 2014-03-24 18:38:41.596646220 +0000
  Modify: 2014-03-24 18:38:41.596646220 +0000

So the files f and g have the same timestamp even though date between
the two writes shows two different, later, times. In this case any
check comparing 'now' to the first file would indicate that 'now' is
later than first file, but the second file still gets the same timestamp
as the first file.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Received on 2014-03-24 19:48:28 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.