new_file_common: call "noop" before "create_close"
commit83aa5dede6f0f9b04a631d0875d3e4d4f7927a8c
authorEric Wong <normalperson@yhbt.net>
Fri, 9 Dec 2011 11:35:25 +0000 (9 11:35 +0000)
committerEric Wong <normalperson@yhbt.net>
Fri, 9 Dec 2011 11:47:01 +0000 (9 11:47 +0000)
tree7fe3ee8020d3a864cf3ebf61196b67170b9c447f
parent01c200204400c4373c5b5edeb11d1c70a8119795
new_file_common: call "noop" before "create_close"

An upload could've taken a long time, ping and try to ensure
socket is valid to minimize (but not completely eliminate) the
chance create_close hits a stale socket (while reading the
response after writing to it) and becomes non-retryable.  We
treat create_close specially as its less idempotent than any
other command (even other non-idempotent ones).  There may be no
hope of retrying the upload at all if data was streamed and
calling create_close twice will hurt us...
lib/mogilefs/backend.rb
lib/mogilefs/new_file_common.rb