]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commit
introducer.client: use integer seqnums, not time-based. Closes #1767.
authorBrian Warner <warner@lothar.com>
Tue, 19 Mar 2013 00:40:56 +0000 (17:40 -0700)
committerBrian Warner <warner@lothar.com>
Tue, 19 Mar 2013 00:40:56 +0000 (17:40 -0700)
commit3e26c78ee3713e9ffbb3d7d2e725f3d3f9c332ca
tree3dc9e4cfac18cfb3f0282981768919d222f04313
parentff64a0fef5879d3651bc3db6ca0522d96b217d45
introducer.client: use integer seqnums, not time-based. Closes #1767.

This stores the sequence number in BASEDIR/announcement-seqnum, and
increments it each time any service is published (every service
announcement is regenerated with the new sequence number). As everyone
knows, time is an illusion, and occasionally goes backwards, so a
counter is generally safer (and reveals less information about the
node).

Later, we'll improve the introducer client to tolerate rollbacks (where,
perhaps due to a VM being restarted from an earlier checkpoint, the
stored sequence number reverts to an earlier version).
src/allmydata/client.py
src/allmydata/introducer/client.py
src/allmydata/introducer/server.py
src/allmydata/test/test_introducer.py