[tahoe-lafs-trac-stream] [tahoe-lafs] #1767: update Announcement "timestamp": sequence number?

tahoe-lafs trac at tahoe-lafs.org
Sat Mar 16 16:05:36 UTC 2013


#1767: update Announcement "timestamp": sequence number?
-------------------------+-------------------------------------------------
     Reporter:  warner   |      Owner:  warner
         Type:           |     Status:  assigned
  enhancement            |  Milestone:  1.10.0
     Priority:  major    |    Version:  1.9.1
    Component:  code-    |   Keywords:  forward-compatibility introduction
  network                |  time blocker
   Resolution:           |
Launchpad Bug:           |
-------------------------+-------------------------------------------------

Comment (by warner):

 I thought of a better example. Suppose we have 4 services A/B/C/D, and
 we've been publishing them for a while:

  * (10,service=A,data=dA1) (11,B,dB1) (12,C,dC1) (13,D,dD1)
  * now we shut down services B and C and stop announcing them
  * now the node crashes and loses its counter
  * the new node wakes up and publishes its remaining services
   * with a new counter
   * with new data for service A
  * (0,service=A,data=dA2) [ignored by others]
  * (1,D,dD1) [ignored by others]
  * node hears back the earlier (10,A,dA1), but isn't subscribed to hear
 about the others
  * node increments counter to 10+1=11
  * announce (11,A,dA2) (12,D,dD1)
  * node doesn't realize it's service D is out-of-date, and other nodes
 will continue to ignore announcements for a while

 Also, I'm thinking the nonce is important, and should basically be part of
 the counter. So every time you increment the counter, you also make a new
 nonce, and the announcement's seqnum= field is a two-element list of
 {{{(counter, nonce)}}}. The comparison rule says that recipients ignore
 announcements with counters that are lower than or equal than what they
 currently know about. They also ignore announcements which are identical
 to what they're currently heard. In the future, when a recipient sees a
 lower-or-equal counter in a non-identical announcement, they can send back
 a copy of their current copy, to let the sender know that they need to
 update their counter. The nonce distinguishes reuses of the same counter
 value (just without any sense of ordering).

 seqnum+nonce is the same trick I used in Foolscap during reconnections, to
 tell whether you're talking to the same peer that you were just connected
 to, or to a newly rebooted instance of that peer. I think we use similar
 rules over there.

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1767#comment:15>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


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