Bug 762279 (GLUSTER-547) - write-behind enable-trickling-writes working?
Summary: write-behind enable-trickling-writes working?
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-547
Product: GlusterFS
Classification: Community
Component: write-behind
Version: 3.0.0
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Raghavendra G
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-19 00:59 UTC by Krishna Srinivas
Modified: 2010-02-10 10:56 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: RTP
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

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')


Note You need to log in before you can comment on or make changes to this bug.