Print

Print


Previously, the underlying OFS file handle was not closed until the destructor on the XrdTpcStream object was called - this occurs after the response was sent to a client.

In this case, subsequent operations may be done while the file is still open for writing, which may mean data has not been written out from the client cache to the distributed file system. If the subsequent operation (such as stat) is load-balanced to a different data server, then the second operation may observe an incomplete file.

The fix is to explicitly cause the file handle to be closed prior to sending the response to the client. Then, as long as the filesystem has open-to-close consistency (which NFS and HDFS do have -- a much looser consistency requirement than POSIX), this should remove the possibility of reading an incomplete file.

This bug was revealed while testing load-balanced Xrootd on top of a HDFS filesystem at Nebraska. Depending on how often the race condition was triggered, it caused failure rates of up to 10%.


You can view, comment on, or merge this pull request online at:

  https://github.com/xrootd/xrootd/pull/891

Commit Summary

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/xrootd/xrootd","title":"xrootd/xrootd","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/xrootd/xrootd"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"[TPC] Ensure file is closed prior to sending response to client (#891)"}],"action":{"name":"View Pull Request","url":"https://github.com/xrootd/xrootd/pull/891"}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/pull/891", "url": "https://github.com/xrootd/xrootd/pull/891", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1