adoroszlai opened a new pull request #995:
URL: https://github.com/apache/hadoop-ozone/pull/995


   ## What changes were proposed in this pull request?
   
   Allow deleting chunk files if file size is same as offset + length.  This 
kind of chunk could have been created on old datanode by new client.
   
   Fix read chunk operation after upgrade by using or ignoring chunk offset 
depending on file size.
   
   https://issues.apache.org/jira/browse/HDDS-3644
   
   ## How was this patch tested?
   
   Added unit test case.
   
   Tested upgrade (from 0.5.0 to patched `0466ade7d~1`, as a workaround for 
HDDS-3499) manually on docker-compose cluster:
   
   * new client can still read before upgrade (this is true for both `master` 
and patched version)
   * new client can read after upgrade (fixed)
   * if key is deleted and container closed, chunk files get correctly deleted 
eventually
   
   ```
   datanode_1  | ... [BlockDeletingService#4] INFO impl.FilePerChunkStrategy: 
Deleted chunk file 
/data/hdds/hdds/50e2d8f9-82a5-488c-aa77-319394ea23c1/current/containerDir0/1/chunks/104252079982641152_chunk_1
 (size 4194304) for chunk ChunkInfo{chunkName='104252079982641152_chunk_1, 
offset=0, len=4194304}
   datanode_1  | ... [BlockDeletingService#4] INFO impl.FilePerChunkStrategy: 
Deleted chunk file 
/data/hdds/hdds/50e2d8f9-82a5-488c-aa77-319394ea23c1/current/containerDir0/1/chunks/104252079982641152_chunk_2
 (size 5242880) for chunk ChunkInfo{chunkName='104252079982641152_chunk_2, 
offset=4194304, len=1048576}
   ```
   
   https://github.com/adoroszlai/hadoop-ozone/runs/722746432


----------------------------------------------------------------
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.

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