Bug 762279 (GLUSTER-547)

Summary: write-behind enable-trickling-writes working?
Product: [Community] GlusterFS Reporter: Krishna Srinivas <krishna>
Component: write-behindAssignee: Raghavendra G <raghavendra>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 3.0.0CC: aavati, gluster-bugs, lakshmipathi, sac
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTP Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Krishna Srinivas 2010-01-19 00:59:23 UTC
On mountpoint i do:
[root@client01 mnt]# (while [ true ]; do echo -n i; done) > test

On the backend i do:
[root@client03 export1]# while [ true ]; do stat test ; sleep 1; done
  File: `test'
  Size: 1               Blocks: 16         IO Block: 4096   regular file
Device: 803h/2051d      Inode: 5755908     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 1969-12-31 16:00:00.000000000 -0800
Modify: 2010-01-18 16:54:01.000000000 -0800
Change: 2010-01-18 16:54:01.000000000 -0800
  File: `test'
  Size: 131073          Blocks: 280        IO Block: 4096   regular file
Device: 803h/2051d      Inode: 5755908     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 1969-12-31 16:00:00.000000000 -0800
Modify: 2010-01-18 16:54:05.000000000 -0800
Change: 2010-01-18 16:54:05.000000000 -0800
  File: `test'
  Size: 131073          Blocks: 280        IO Block: 4096   regular file
Device: 803h/2051d      Inode: 5755908     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 1969-12-31 16:00:00.000000000 -0800
Modify: 2010-01-18 16:54:05.000000000 -0800
Change: 2010-01-18 16:54:05.000000000 -0800
  File: `test'
  Size: 131073          Blocks: 280        IO Block: 4096   regular file
Device: 803h/2051d      Inode: 5755908     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 1969-12-31 16:00:00.000000000 -0800
Modify: 2010-01-18 16:54:05.000000000 -0800
Change: 2010-01-18 16:54:05.000000000 -0800
  File: `test'
  Size: 131073          Blocks: 280        IO Block: 4096   regular file
Device: 803h/2051d      Inode: 5755908     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 1969-12-31 16:00:00.000000000 -0800
Modify: 2010-01-18 16:54:05.000000000 -0800
Change: 2010-01-18 16:54:05.000000000 -0800

If you notice the size and time are not changed at all, regardless of whether enable-trickling-writes is on or off. If I remove write-behind then the size and time are continuously updated. Hence enable-trickling-writes on/off is not working.

Comment 1 Sachidananda Urs 2010-01-20 05:27:46 UTC
Hi, 

I have reproduced the issue with gluster 3.0.0 and following are the steps to reproduce the same:

1) A script that writes to stdout at a slowish pace


perl ./te.pl > out

te.pl listing:

use Time::HiRes qw( usleep );

while ( true ) {
print "yes\n";
usleep(500);
}

2) A script that watches the file size:

while true; do VAL=$(/bin/date); OUT=$(ls -lh /mnt/out 2>/dev/null);
echo "$VAL: $OUT"; sleep 10; done

Regards,
Sachidananda.

Comment 2 Anand Avati 2010-01-23 17:36:40 UTC
PATCH: http://patches.gluster.com/patch/2684 in master (write-behind: fix 'option enable-trickling-writes')

Comment 3 Anand Avati 2010-01-23 17:36:44 UTC
PATCH: http://patches.gluster.com/patch/2685 in release-2.0 (write-behind: fix 'option enable-trickling-writes')