[PATCH] Only write 100 test files, not 10000

Nick Andrew nick at nick-andrew.net
Mon Jun 23 06:09:56 UTC 2008


Only write 100 test files, not 10000

Limit the number of write test files to 100 rather than 10,000. Even
though the files are tiny, that's still 9900 less useless files to
keep.

Signed-off-by: Nick Andrew <nick at nick-andrew.net>
---

 server/lib/MogileFS/Worker/Monitor.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/server/lib/MogileFS/Worker/Monitor.pm b/server/lib/MogileFS/Worker/Monitor.pm
index 9179d45..c57486c 100644
--- a/server/lib/MogileFS/Worker/Monitor.pm
+++ b/server/lib/MogileFS/Worker/Monitor.pm
@@ -167,7 +167,7 @@ sub check_device {
     # function caches what it's already created.
     $dev->create_directory("/dev$devid/test-write");
 
-    my $num = int(rand 10000);  # this was "$$-$now" before, but we don't yet have a cleaner in mogstored for these files
+    my $num = int(rand 100);  # this was "$$-$now" before, but we don't yet have a cleaner in mogstored for these files
     my $puturl = "http://$hostip:$port/dev$devid/test-write/test-write-$num";
     my $content = "time=$now rand=$num";
     my $req = HTTP::Request->new(PUT => $puturl);



More information about the mogilefs mailing list