amplab/tachyon — pull request #477 by manugoyal (2014-10-20 01:26:10+00:00)
Title: Fixed the userId changing issue [TACHYON-171]

The problem is that if a user opens a client connection and starts
writing a file, but finishes writing after a certain
timeout (user.master.client.timeout.ms), then the MasterClient will
close its connection before the file is written, then reconnect and get
a new userId, which will screw up the write.

I'm not quite sure why we automatically close the connection if it
hasn't been used for a while, as we aren't really wasting any resources
by keeping it open. This change removes the original heartbeat
mechanism, which tracks how recently the client has been used and closes
the connection automatically, with a heartbeat that pings the master to
check the connection, and closes the client only if it can't connect to
the master. Now on a long write (or any operation with the client that
takes very long), we won't reconnect and change the userId.