[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2505: Magic Folder: consider types of (size, ctime, mtime) more carefully

Tahoe-LAFS trac at tahoe-lafs.org
Tue Jan 19 17:51:20 UTC 2016


#2505: Magic Folder: consider types of (size, ctime, mtime) more carefully
-------------------------------------+-------------------------------------
     Reporter:  daira                |      Owner:  daira
         Type:  defect               |     Status:  new
     Priority:  normal               |  Milestone:  undecided
    Component:  code-frontend-       |    Version:  1.10.1
  magic-folder                       |   Keywords:  blocks-magic-folder-
   Resolution:                       |  merge
Launchpad Bug:                       |
-------------------------------------+-------------------------------------

Comment (by meejah):

 dawuud's changes look good to me; certainly an improvement over what's
 there now.

 I do share the `==` concern about floats -- *especially* because Python's
 internal representation isn't necessarily an 8-byte IEEE as SQLite's is.

 Also, although `time.time()` does return a float, we really only care
 about seconds so wouldn't lose anything by storing an INTEGER in the
 database and always doing `int(time.time())` when comparing timestamps
 (that is, throwing away fractional seconds). Also, within Twisted, it's
 far better to use `IReactorTime.seconds()` anyway. So whenever it's
 convenient (e.g. whenever we have a reactor instance to call `.seconds()`
 on) we should probably prefer that. As a side-effect, this makes testing
 things that use that interface properly way easier.

 Personally, I think the integer based approach is far less likely to have
 weird errors or rounding issues etc. and is thus overall way safer.

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2505#comment:6>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list