Bug 1808421

Summary: WORM: If autocommit-period 0 file will be WORMed with 0 Byte during initial write
Product: [Community] GlusterFS Reporter: david.spisla
Component: coreAssignee: bugs <bugs>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-12 13:26:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description david.spisla 2020-02-28 13:48:41 UTC
Description of problem:
If worm-file-level enabled and auto-commit-period 0 an initial write
of a file (e.g. $ echo test >> file1.txt) would lead to an zero byte
file because the WORM xlator immediately WORMed the file when it was
created.


Version-Release number of selected component (if applicable):
5.5

How reproducible:
Steps to Reproduce:
1. Enable worm-file-level for a volume and set auto-commit-period to 0
2. Mount the volume e.g. FUSE, NFS or SMB
3. Write a file e.g. $ echo test >> file1.txt or copy some file to the mountpoint

Actual results:
File will have O Byte and it is WORMed


Expected results:
The new file respective copy should be complete and it is WORMed
(one can check the comleteness with a md5 checksum of the original and new copy)


Additional info:

Comment 1 Worker Ant 2020-02-28 14:35:38 UTC
REVIEW: https://review.gluster.org/24190 (WORM-Xlator: Initial write of a file succeeds if auto-commit-period 0) posted (#1) for review on master by David Spisla

Comment 2 Worker Ant 2020-03-12 13:26:58 UTC
This bug is moved to https://github.com/gluster/glusterfs/issues/1020, and will be tracked there from now on. Visit GitHub issues URL for further details

Comment 3 Worker Ant 2020-03-17 04:24:43 UTC
REVIEW: https://review.gluster.org/24190 (WORM-Xlator: Initial write of a file succeeds if auto-commit-period 0) merged (#4) on master by Amar Tumballi