Action required: update your Upspin software

323 views
Skip to first unread message

Rob Pike

unread,
Oct 18, 2017, 9:36:54 PM10/18/17
to Upspin

We are changing Upspin to use a different model for sequence numbers. The short version: Update both your client and server software as soon as possible. And to avoid any problems, make sure to update both.



Updating your software:


To update your Upspin clients, download the binary release suitable for your system and replace your upspin, upspinfs, and cacheserver binaries.


To update your Upspin servers, update to the latest version (substitute the import path for the server you are using):


 $ go get -u -d gcp.upspin.io/cmd/upspinserver-gcp


Build it for the target os/architecture (linux/amd64 in this example):


 $ GOOS=linux GOARCH=amd64 go build -o upspinserver gcp.upspin.io/cmd/upspinserver-gcp


And then re-deploy it to your server (stop the service, copy the upspinserver binary, run setcap if necessary, and start the service again).


The rest of this mail explains things in detail, but all you really need to know is that you should update your Upspin software.



Technical details:


These details are only important at the API level or if you are interested in the innards of the implementation.


A while back, we realized that the way the "order" parameter in DirServer.Watch worked made it insufficient for certain problems, especially those involving the cacheserver and disconnected operation. We have made several changes to address this, the most important being:


  • The sequence number is now determined by the DirServer, not the client, and is just a monotonically increasing number. The sequence starts at 1 for each user tree, and grows with each Put or Delete.
  • When a Put or Delete happens, the sequence number is updated and the new value becomes the sequence number for the affected file, its directory, and so on all the way to the root. Thus the root's sequence number is now the sequence number of the most recently completed operation.
  • The return value from a successful call to DirServer.Put is no longer nil. Instead, the server returns an "incomplete" DirEntry with the sequence number that resulted. This allows clients such as the cacheserver to notice when something has changed unexpectedly.
  • The sequence number in a DirEntry no longer has random high bits. Those bits are no longer necessary as the new model for sequence numbers handles the race condition they were introduced to solve.
  • The Order field is also gone from the upspin.Event struct. The Sequence field of the DirEntries serves the purpose now. The DirServer.Watch method now takes a sequence number instead of its order parameter.


To roll out all these changes safely, the directory server implementation now has a version number for its logs. It can read the old logs (and directory blocks) but will only write logs in the new format. When handling old logs or old directory entries stored in the StoreServer, it translates the sequence numbers from the old model to the new.


This work was done in a separate development branch and has been merged into the master branch, and the downloadable binaries now embody the new model.


If you update your client and server software together, all should work just fine. If you don't update, most things will still work but not perfectly. Also, there will be problems, particularly around Watch, if you do not update both.


We therefore encourage you to update your systems as soon as possible so everyone's software will be able to work properly across the system.


The servers at upspin.io are already updated.


We apologize for the disruption and have tried hard to make the cutover as painless as possible. We also hope not to have many more such changes.


Thanks.

- the Upspin team

Reply all
Reply to author
Forward
0 new messages