chihsuan commented on PR #10651:
URL: https://github.com/apache/ozone/pull/10651#issuecomment-5254445664

   > If we want to perform data validation, I think a better approach would be 
using deterministic content generation so that the expected hash can be 
re-derived on the fly during reads. This way, we don't need to track and store 
unnecessary historical state per thread/path.
   
   Thanks @chungen0126. Fair point, and that is close to how the existing 
validators already work. They write the same content everywhere and compare 
everything against a single reference digest, so they keep no per-file state.
   
   The reason this PR departs from that is that the same property makes **stale 
reads** invisible. If every file holds identical content, an overwrite rewrites 
the same bytes, so a read returning an older version still matches. To catch 
that, the reader has to know which version it expects, which is where the 
per-path state comes from.
   
   So it comes down to scope rather than how the expected value is obtained. 
HDDS-14524 asks to keep a hash per file and read back a file previously written 
by the same thread, so dropping that would take the workload away from what the 
Jira describes.
   
   Do you think stale read detection is worth covering? If not, I am happy to 
follow the existing reference digest pattern and update HDDS-14524 and PR to 
match. 🙏


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to