dCache / xrootd4j

Implementation of the xrootd data access protocol in Java
Other
3 stars 8 forks source link

xrootd4j: improve handling of TPC read requests #105

Closed alrossi closed 3 years ago

alrossi commented 3 years ago

Motivation:

https://github.com/xrootd/xrootd/issues/1454

While testing against the RAL server, we encountered an issue with buffer size/request block that is a known bug in the rados striper (used by the xrootd Ceph plug-in).

The problem (sending back garbage bytes beyond EOF) results in a corrupt file error.

The xrootd client reportedly prevents something like this from happening because it requests only the exact number of bytes left on the last chunk.

Modification:

Modify the way the final request is handled by not asking for the default block size, but only for the remaining bytes, which conforms with the way the native xrootd client behaves.

For bytes > remaining, log an error. Then, if we have written past EOF, throw an exception.

Result:

A clearer indication of a failure on the source server side when too many bytes are sent, and hopefully a remedy for avoiding that situation.

Target: master Request: 4.2 Request: 4.1 Request: 4.0 Request: 3.5 Patch: https://rb.dcache.org/r/13124/ Requires-notes: yes Requires-book: no Acked-by: Tigran Acked-by: Paul