Changeset 1198
- Timestamp:
- 07/10/08 14:24:56 (17 months ago)
- Location:
- trunk
- Files:
-
- 47 modified
-
api/perl/MogileFS-Client-FilePaths/lib/MogileFS/Client/FilePaths.pm (modified) (1 diff)
-
api/perl/MogileFS-Client/debian/control (modified) (1 diff)
-
api/perl/MogileFS-Client/lib/MogileFS/Backend.pm (modified) (1 diff)
-
api/perl/MogileFS-Client/lib/MogileFS/Client.pm (modified) (1 diff)
-
api/perl/MogileFS-Client/lib/MogileFS/NewHTTPFile.pm (modified) (1 diff)
-
fuse/mount-filepaths (modified) (1 diff)
-
server-plugins/MogileFS-Network/lib/MogileFS/Network.pm (modified) (1 diff)
-
server-plugins/MogileFS-Network/lib/MogileFS/ReplicationPolicy/MultipleNetworks.pm (modified) (2 diffs)
-
server-plugins/MogileFS-Network/t/hosts-per-zone-replpol.t (modified) (2 diffs)
-
server-plugins/MogileFS-Plugin-FilePaths/Makefile.PL (modified) (1 diff)
-
server-plugins/MogileFS-Plugin-FilePaths/MogileFS-Plugin-FilePaths.spec (modified) (2 diffs)
-
server-plugins/MogileFS-Plugin-FilePaths/lib/MogileFS/Plugin/FilePaths.pm (modified) (2 diffs)
-
server/CHANGES (modified) (9 diffs)
-
server/MogileFS-Server.spec (modified) (1 diff)
-
server/TODO (modified) (1 diff)
-
server/debian/changelog (modified) (1 diff)
-
server/debian/control (modified) (1 diff)
-
server/doc/fsck-notes.txt (modified) (1 diff)
-
server/doc/memcache-support.txt (modified) (2 diffs)
-
server/doc/testing.txt (modified) (1 diff)
-
server/lib/MogileFS/Config.pm (modified) (2 diffs)
-
server/lib/MogileFS/Device.pm (modified) (1 diff)
-
server/lib/MogileFS/Domain.pm (modified) (1 diff)
-
server/lib/MogileFS/FID.pm (modified) (1 diff)
-
server/lib/MogileFS/HTTPFile.pm (modified) (1 diff)
-
server/lib/MogileFS/IOStatWatcher.pm (modified) (1 diff)
-
server/lib/MogileFS/ProcManager.pm (modified) (3 diffs)
-
server/lib/MogileFS/ReplicationPolicy/MultipleHosts.pm (modified) (1 diff)
-
server/lib/MogileFS/ReplicationPolicy/Union.pm (modified) (1 diff)
-
server/lib/MogileFS/ReplicationRequest.pm (modified) (1 diff)
-
server/lib/MogileFS/Store.pm (modified) (4 diffs)
-
server/lib/MogileFS/Util.pm (modified) (2 diffs)
-
server/lib/MogileFS/Worker.pm (modified) (1 diff)
-
server/lib/MogileFS/Worker/Delete.pm (modified) (2 diffs)
-
server/lib/MogileFS/Worker/Query.pm (modified) (6 diffs)
-
server/lib/MogileFS/Worker/Replicate.pm (modified) (4 diffs)
-
server/lib/Mogstored/SideChannelClient.pm (modified) (1 diff)
-
server/mogautomount (modified) (1 diff)
-
server/mogilefsd (modified) (1 diff)
-
server/mogstored (modified) (2 diffs)
-
server/t/10-weighting.t (modified) (1 diff)
-
server/t/20-filepaths.t (modified) (1 diff)
-
server/t/mogstored-shutdown.t (modified) (1 diff)
-
server/t/multiple-hosts-replpol.t (modified) (1 diff)
-
utils/debian/control (modified) (1 diff)
-
utils/mogadm (modified) (5 diffs)
-
utils/mogtool (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/api/perl/MogileFS-Client-FilePaths/lib/MogileFS/Client/FilePaths.pm
r1139 r1198 40 40 provided in the FilePaths plugin. 41 41 42 All methods are inher eted and usable from the MogileFS::Client library, with only the exceptions listed below.42 All methods are inherited and usable from the MogileFS::Client library, with only the exceptions listed below. 43 43 44 44 =cut -
trunk/api/perl/MogileFS-Client/debian/control
r166 r1198 10 10 Depends: ${perl:Depends}, libio-stringy-perl, libwww-perl 11 11 Description: perl client for MogileFS 12 MogileFS.pm provides a the perl client for the MogileFS application-level12 MogileFS.pm provides a perl client for the MogileFS application-level 13 13 distributed filesystem. -
trunk/api/perl/MogileFS-Client/lib/MogileFS/Backend.pm
r749 r1198 13 13 use fields ('hosts', # arrayref of "$host:$port" of mogilefsd servers 14 14 'host_dead', # "$host:$port" -> $time (of last connect failure) 15 'lasterr', # string: \w+ identif er of last error15 'lasterr', # string: \w+ identifier of last error 16 16 'lasterrstr', # string: english of last error 17 17 'sock_cache', # cached socket to mogilefsd tracker -
trunk/api/perl/MogileFS-Client/lib/MogileFS/Client.pm
r1149 r1198 156 156 =head2 errstr 157 157 158 Returns string representation of the last error that occur ed. It158 Returns string representation of the last error that occurred. It 159 159 includes the error code (same as method 'errcode') and a space before 160 160 the optional English error message. -
trunk/api/perl/MogileFS-Client/lib/MogileFS/NewHTTPFile.pm
r816 r1198 180 180 181 181 # abstracted write function that uses non-blocking I/O and checking for 182 # writ ability to ensure that we don't get stuck doing a write if the182 # writeability to ensure that we don't get stuck doing a write if the 183 183 # node we're talking to goes down. also handles logic to fall back to 184 184 # a backup node if we're on our first write and the first node is down. -
trunk/fuse/mount-filepaths
r1135 r1198 205 205 --file-perms PERMS 206 206 The default file permissions for all files in the mounted MogileFS 207 filesystem. Since Mogile fS does not store this information currently207 filesystem. Since MogileFS does not store this information currently 208 208 it must be faked. 209 209 -
trunk/server-plugins/MogileFS-Network/lib/MogileFS/Network.pm
r1179 r1198 76 76 } 77 77 78 # This is a sep erate subroutine so I can redefine it at test time.78 # This is a separate subroutine so I can redefine it at test time. 79 79 sub get_setting { 80 80 my $key = shift; -
trunk/server-plugins/MogileFS-Network/lib/MogileFS/ReplicationPolicy/MultipleNetworks.pm
r1162 r1198 124 124 125 125 my @ideal = grep { ! $skip_host{$_->hostid} } @all_dests; 126 # wrong network is less desp arate than wrong host126 # wrong network is less desperate than wrong host 127 127 my @network_desp = grep { $skip_host{$_->hostid} && 128 128 $skip_host{$_->hostid} eq AVOIDNETWORK } @all_dests; … … 161 161 { 162 162 my %cache; # '192.168.0.0/24' => Net::Netmask->new2('192.168.0.0/24'); 163 my $age; # increments every time we look163 my $age; # increments every time we look 164 164 165 165 # turn a server ip into a network -
trunk/server-plugins/MogileFS-Network/t/hosts-per-zone-replpol.t
r1179 r1198 21 21 "ideal(3,4)", "need host2"); 22 22 23 # still needs to be on host2, even though 2 co ies on host123 # still needs to be on host2, even though 2 copies on host1 24 24 is(rr("min=2 h1[d1=X d2=X] h2[d3=_ d4=_]"), 25 25 "ideal(3,4)", "need host2, even though 2 on host1"); … … 42 42 43 43 # minimum hosts is 3, only 2 available hosts. This test differs from 44 # the one in multiplehosts because el avating these results to be 'ideal'44 # the one in multiplehosts because elevating these results to be 'ideal' 45 45 # adds complexity that is unnecessary in my eyes. 46 46 is(rr("min=3 h1[d1=_ d2=X] h2[d3=X d4=_]"), -
trunk/server-plugins/MogileFS-Plugin-FilePaths/Makefile.PL
r810 r1198 7 7 VERSION_FROM => 'lib/MogileFS/Plugin/FilePaths.pm', 8 8 AUTHOR => 'Jonathan Steinert <hachi@cpan.org>', 9 ABSTRACT => 'Plugin for mogilefs server represen ding a UNIX like filesystem on top of mogilefs.',9 ABSTRACT => 'Plugin for mogilefs server representing a UNIX like filesystem on top of mogilefs.', 10 10 PREREQ_PM => { 11 11 'MogileFS::Plugin::MetaData' => '0.01', -
trunk/server-plugins/MogileFS-Plugin-FilePaths/MogileFS-Plugin-FilePaths.spec
r1103 r1198 1 1 name: perl-MogileFS-Plugin-FilePaths 2 summary: perl-MogileFS-Plugin-FilePaths - MogileFS Tracker plugin to repre psent a traditional unix filesystem in mogilefs.2 summary: perl-MogileFS-Plugin-FilePaths - MogileFS Tracker plugin to represent a traditional unix filesystem in mogilefs. 3 3 version: 0.02 4 4 release: 1 … … 13 13 14 14 %description 15 MogileFS Tracker plugin to repre psent a traditional unix filesystem in mogilefs.15 MogileFS Tracker plugin to represent a traditional unix filesystem in mogilefs. 16 16 17 17 %prep -
trunk/server-plugins/MogileFS-Plugin-FilePaths/lib/MogileFS/Plugin/FilePaths.pm
r1103 r1198 21 21 # MogileFS to consider the plugin to have loaded successfully. if you return a 22 22 # non-true value, you MUST NOT install any handlers or other changes to the system. 23 # if you install something here, you MUST un install it in the unload sub.23 # if you install something here, you MUST un-install it in the unload sub. 24 24 25 25 sub _parse_path { … … 279 279 280 280 # this sub is called at the end or when the module is being unloaded, this needs to 281 # unregister any registered methods, etc. you MUST un install everything that the281 # unregister any registered methods, etc. you MUST un-install everything that the 282 282 # plugin has previously installed. 283 283 sub unload { -
trunk/server/CHANGES
r1183 r1198 1 * Postgres locking routines did not include the hostname for the lock 1 * Many spelling errors corrected. 2 3 * PostGres locking routines did not include the hostname for the lock 2 4 release. 3 5 … … 12 14 * Fix MultipleHosts replication policy to no longer return desperate 13 15 devices after no longer being desperate, instead returning a state 14 which will queue for retries in the future till it can be tru ely16 which will queue for retries in the future till it can be truly 15 17 happy. This prevents files from being replicated to all writable 16 18 devs when there are two few writable hosts to satisfy the policy. … … 78 80 * Add a safety check to ensure that Postgresql-8.2 or newer is used. 79 81 80 * Update mogdbsetup usage, and ensure it cho ses the correct admin82 * Update mogdbsetup usage, and ensure it chooses the correct admin 81 83 username automatically. 82 84 83 85 * Document the --type option to mogdbsetup. 84 86 85 * Introduce the Post gres Store implementation. The locking system might87 * Introduce the PostGres Store implementation. The locking system might 86 88 still have issues, beware of stale locks! Initial prototype by Radu 87 89 Greab <rg@yx.ro>, and developed heavily by Robin H. Johnson … … 100 102 101 103 * The unix_timestamp function belongs to the Store, not other classes. 102 Need to add test cases for process_deletes and stats.104 Need to add test cases for process_deletes and stats. 103 105 104 106 * Using NULL during an INSERT for the AUTO_INCREMENT column does not … … 106 108 to the INSERT instead. 107 109 108 * Clean up all raw usages of UNIX_TIME TAMP() function, in preparation110 * Clean up all raw usages of UNIX_TIMESTAMP() function, in preparation 109 111 for database independence. If you need the unix timestamp, include the output 110 112 of $self->unix_timestamp directly into your query. … … 139 141 DeviceStates interface. 140 142 141 * use signifi gantly less CPU when re-broadcasting around143 * use significantly less CPU when re-broadcasting around 142 144 iostat device utilization% to child processes. (future: 143 145 don't rebroadcast at all and use shared memory) … … 280 282 281 283 * test cleanup/robustness improvements. properly skips testing when 282 testin deps not found. but searches harder for them now, too.284 testing deps not found. but searches harder for them now, too. 283 285 tests run under "make disttest". 284 286 … … 301 303 302 304 2007-03-16: 303 * mogstored: make child processes be exec'ed (as as their own scripts, not inher tting305 * mogstored: make child processes be exec'ed (as as their own scripts, not inheriting 304 306 Perlbal, Linux::AIO/IO::AIO, etc baggage). so they don't own listening 305 307 sockets, pipes to child workers, signal handlers, etc. just a lot … … 355 357 356 358 2006-03-01 (Brad) 357 * mogilefsd: fix dataloss bug when the 'tempfile' table is Inno dband the359 * mogilefsd: fix dataloss bug when the 'tempfile' table is InnoDB and the 358 360 server is restarted while the tempfile table is empty. 359 361 -
trunk/server/MogileFS-Server.spec
r1182 r1198 1 1 name: MogileFS-Server 2 summary: Mo ilgeFS-Server - MogileFS Server daemons and utilities.2 summary: MogileFS-Server - MogileFS Server daemons and utilities. 3 3 version: 2.17 4 4 release: 1 -
trunk/server/TODO
r1054 r1198 1 -- if run out file descriptors in mogilefsd, mogilefsd shouldn't crash. it might1 -- if run out file descriptors in mogilefsd, mogilefsd shouldn't crash. it might 2 2 now. needs a test. 3 3 4 -- change debug level at runtime from mgmt port, prop ogate to children.4 -- change debug level at runtime from mgmt port, propagate to children. 5 5 6 6 -- MogileFS::Device ->make_directory on lighttpd isn't exactly right, as WebDAV -
trunk/server/debian/changelog
r236 r1198 1 1 mogilefs-server (1.00-2) unstable; urgency=low 2 2 3 * fix data loss bug when the 'tempfile' table is Innodband the3 * fix data loss bug when the 'tempfile' table is InnoDB and the 4 4 server is restarted while the tempfile table is empty. 5 5 -
trunk/server/debian/control
r1186 r1198 20 20 Description: scalable distributed filesystem from Danga Interactive 21 21 MogileFS is an open-source, application-level distributed filesystem. It 22 creates a host-n uetral, filesystem-agnostic method of distributing files22 creates a host-neutral, filesystem-agnostic method of distributing files 23 23 that has many advantages over NFS and single-machine raid. This set 24 24 of utilities is very scalable and can handle Livejournal.com's load, for -
trunk/server/doc/fsck-notes.txt
r384 r1198 29 29 # todo: stat command to get count of rows in needs_replicate (!repl replacement) 30 30 31 # provide command to drop fsck table to force global re indexing31 # provide command to drop fsck table to force global re-indexing 32 32 # interface from fsck job to replicate job. or do it ourselves sharing code. (probably sharing code) 33 33 # perhaps command-line version is just running: -
trunk/server/doc/memcache-support.txt
r718 r1198 6 6 still maintain it's (usually) stupid. 7 7 8 Reall , you should cache get_paths requests in your application,8 Really, you should cache get_paths requests in your application, 9 9 avoiding an extra round-trip to the trackers that could be avoided on 10 10 a cache hit. … … 28 28 set_server_setting key=memcache_servers&value=127.0.0.1:11211 29 29 30 (where value is a comma n-separated list, if you have multiple)30 (where value is a comma-separated list, if you have multiple) 31 31 32 32 And then all future get_paths requests with noverify=1 (which now -
trunk/server/doc/testing.txt
r1064 r1198 26 26 Manual tests 27 27 ============ 28 If you only want to run some part of the test suite, or you want detailed28 If you only want to run some part of the test suite, or you want detailed 29 29 output as to why a test failed, you can run as follows: 30 30 $ MOGTEST_DBTYPE=<dbtype> perl -Ilib t/<foobar>.t -
trunk/server/lib/MogileFS/Config.pm
r1180 r1198 24 24 my ($k, $v) = @_; 25 25 26 # if a child, prop ogate to parent26 # if a child, propagate to parent 27 27 if (my $worker = MogileFS::ProcManager->is_child) { 28 28 $worker->send_to_parent(":set_config_from_child $k $v"); … … 132 132 133 133 # Fill in defaults for those values which were either loaded from config or 134 # specified on the command line. Command line takes prece ndence, then values in134 # specified on the command line. Command line takes precedence, then values in 135 135 # the config file, then the defaults. 136 136 $daemonize = choose_value( 'daemonize', 0 ); -
trunk/server/lib/MogileFS/Device.pm
r1166 r1198 374 374 if ($ans && $ans =~ m!HTTP/1\.[01] (400|405|501)!) { 375 375 $self->{no_mkcol} = 1; 376 # TODO: move this into method on device, which prop ogates to parent376 # TODO: move this into method on device, which propagates to parent 377 377 # and also receive from parent. so all query workers share this knowledge 378 378 return 1; -
trunk/server/lib/MogileFS/Domain.pm
r1159 r1198 75 75 # flushes locally (for things like "get_domains" or "get_hosts", where 76 76 # it needs to be locally correct for the semantics of the command, but 77 # no need to prop ogate a cache invalidation to our peers)77 # no need to propagate a cache invalidation to our peers) 78 78 sub invalidate_cache { 79 79 $last_load = 0; -
trunk/server/lib/MogileFS/FID.pm
r1114 r1198 150 150 # returns array of devids that this fid is on 151 151 # NOTE: TODO: by default, this doesn't cache. callers might be surprised from 152 # having an old version later on. before caching is added, audit ting needs152 # having an old version later on. before caching is added, auditing needs 153 153 # to be done. 154 154 sub devids { -
trunk/server/lib/MogileFS/HTTPFile.pm
r1147 r1198 125 125 my ($host, $port, $uri, $path) = map { $self->{$_} } qw(host port uri url); 126 126 127 # don't sigpipeus127 # don't SIGPIPE us 128 128 my $flag_nosignal = MogileFS::Sys->flag_nosignal; 129 129 local $SIG{'PIPE'} = "IGNORE" unless $flag_nosignal; -
trunk/server/lib/MogileFS/IOStatWatcher.pm
r716 r1198 27 27 pass it hostnames instead of ip addresses. 28 28 29 Upon successful lconnection, the on_stats callback will be called each time the statistics are29 Upon successful connection, the on_stats callback will be called each time the statistics are 30 30 collected. Error states (failed connections, etc.) will trigger retries on 60 second intervals, and 31 31 disconnects will trigger an immediate reconnect. -
trunk/server/lib/MogileFS/ProcManager.pm
r1120 r1198 9 9 10 10 # This class handles keeping lists of workers and clients and 11 # assigning them to each other when things happen. You don't actually11 # assigning them to each other when things happen. You don't actually 12 12 # instantiate a procmanager. the class itself holds all state. 13 13 … … 532 532 !replication 533 533 (Deprecated/old) 534 See the replication status for un replicated files.534 See the replication status for un-replicated files. 535 535 Output format: 536 536 <domain> <class> <devcount> <files> … … 578 578 } elsif ($cmd =~ /^:repl_unreachable (\d+)/) { 579 579 # announce to the other replicators that this fid can't be reached, but note 580 # that we don't actually drain the queue to the request or, as the replicator580 # that we don't actually drain the queue to the requester, as the replicator 581 581 # isn't in a place where it can accept a queue drain right now. 582 582 MogileFS::ProcManager->ImmediateSendToChildrenByJob('replicate', "repl_unreachable $1", $child); -
trunk/server/lib/MogileFS/ReplicationPolicy/MultipleHosts.pm
r1142 r1198 33 33 # this is the per-class mindevcount (the old way), which is passed in automatically 34 34 # from the replication worker. but if we have our own configured mindevcount 35 # in class.replpolicy, like "MultipleHosts(3)", then we use the expl ciit one. otherwise,35 # in class.replpolicy, like "MultipleHosts(3)", then we use the explicit one. otherwise, 36 36 # if blank, or zero, like "MultipleHosts()", then we use the builtin on 37 37 my $min = delete $args{min}; -
trunk/server/lib/MogileFS/ReplicationPolicy/Union.pm
r1110 r1198 39 39 =head1 NAME 40 40 41 MogileFS::ReplicationPolicy::Union -- satis ify 2 or more replication policies41 MogileFS::ReplicationPolicy::Union -- satisfy 2 or more replication policies 42 42 43 43 =head1 RULES 44 44 45 Use this replication policy to satis ify multiple replication policies.45 Use this replication policy to satisfy multiple replication policies. 46 46 For instance: 47 47 -
trunk/server/lib/MogileFS/ReplicationRequest.pm
r1145 r1198 60 60 61 61 # returns array of MogileFS::Device objs, in preferred order, one of 62 # which (but not multiple) would satis ify the replication policy62 # which (but not multiple) would satisfy the replication policy 63 63 # for its next step. at which point the replication policy needs 64 64 # to be asked again what the next step is. -
trunk/server/lib/MogileFS/Store.pm
r1185 r1198 329 329 return 1 if $self->was_duplicate_error; 330 330 # This chunk is identical to condthrow, but we include it directly 331 # here as we know there is defin etly an error, and we would like331 # here as we know there is definitely an error, and we would like 332 332 # the caller of this function. 333 333 my ($pkg, $fn, $line) = caller; … … 596 596 # 0 means immediate. it's only on one host. 597 597 # 1 means lower priority. it's on 2+ but isn't happy where it's at. 598 # unix timestamp means at/after that time. some previous error occurred.598 # unix timestamp means at/after that time. some previous error occurred. 599 599 # fromdevid, if not null, means which devid we should replicate from. perhaps it's the only non-corrupt one. otherwise, wherever. 600 600 # failcount. how many times we've failed, just for doing backoff of nexttry. … … 1003 1003 }; 1004 1004 if ($@ || $dbh->err) { 1005 # first is mysql's error code for duplicates1005 # first is MySQL's error code for duplicates 1006 1006 if ($self->was_duplicate_error) { 1007 1007 return 0; … … 1476 1476 1477 1477 # FIXME: this blows. not random. and good chances these will 1478 # eventually get to point where they're un-rebalan acable, and we1478 # eventually get to point where they're un-rebalance-able, and we 1479 1479 # never move on past the first 5000 1480 1480 my @some_fids = List::Util::shuffle(@{ -
trunk/server/lib/MogileFS/Util.pm
r1036 r1198 123 123 unless $sess_id = POSIX::setsid(); 124 124 125 ## Prevent possibility of acquiring a control ing terminal125 ## Prevent possibility of acquiring a controlling terminal 126 126 $SIG{'HUP'} = 'IGNORE'; 127 127 if ($pid = fork) { exit 0; } … … 140 140 close(STDERR); 141 141 142 ## Reopen stderr, stdout, stdinto /dev/null142 ## Reopen STDERR, STDOUT, STDIN to /dev/null 143 143 if ( $MogileFS::DEBUG ) { 144 144 open(STDIN, "+>/tmp/mogilefsd.log"); -
trunk/server/lib/MogileFS/Worker.pm
r1036 r1198 222 222 223 223 # tries to parse generic (not job-specific) commands sent from parent 224 # to child. returns 1 on success, or 0 if comman given isn't generic,224 # to child. returns 1 on success, or 0 if command given isn't generic, 225 225 # and child should parse. 226 226 # lineref doesn't have \r\n at end. -
trunk/server/lib/MogileFS/Worker/Delete.pm
r1037 r1198 7 7 8 8 # we select 1000 but only do a random 100 of them, to allow 9 # for stateless paralle ism9 # for stateless parallelism 10 10 use constant LIMIT => 1000; 11 11 use constant PER_BATCH => 100; … … 78 78 # BUT NOTE: 79 79 # the fids might exist on one of the devices in devids column if we assigned them those, 80 # they wrote some to one of them, then they died or for w ahtever reason didn't create_close80 # they wrote some to one of them, then they died or for whatever reason didn't create_close 81 81 # to use, so we shouldn't delete from tempfile before going on a hunt of the missing fid. 82 82 # perhaps we should just add to the file_on table for both devids, and let the regular delete -
trunk/server/lib/MogileFS/Worker/Query.pm
r1174 r1198 251 251 252 252 # find suitable device(s) to put this file on. 253 my @dests; # MogileFS::Device objects which are suitab ke253 my @dests; # MogileFS::Device objects which are suitable 254 254 255 255 while (scalar(@dests) < ($multi ? 3 : 1)) { … … 738 738 my $host = MogileFS::Host->of_hostname($hostname); 739 739 740 # if we're creat eing a new host, require ip/port, and default to740 # if we're creating a new host, require ip/port, and default to 741 741 # host being down if client didn't specify 742 742 if ($args->{update}) { … … 1162 1162 } 1163 1163 1164 # FIXME: this whole thing is gross, duplicative, dependen dent on $dbh, and doesn't scale.1164 # FIXME: this whole thing is gross, duplicative, dependent on $dbh, and doesn't scale. 1165 1165 # stats needs total overhaul to not suck. 1166 1166 sub cmd_stats { … … 1267 1267 } 1268 1268 1269 # now fid stati tics1269 # now fid statistics 1270 1270 if ($args->{fids} || $args->{all}) { 1271 1271 my $max = $dbh->selectrow_array('SELECT MAX(fid) FROM file'); … … 1480 1480 } 1481 1481 1482 # add in any stats which might not'vebeen summarized yet.,,1482 # add in any stats which might have not been summarized yet.,, 1483 1483 my $max_logid = $sto->max_fsck_logid; 1484 1484 my $min_logid = MogileFS::Util::max($intss->("fsck_start_maxlogid"), … … 1520 1520 'bad_params' => "Invalid parameters to command; please see documentation", 1521 1521 'class_exists' => "That class already exists in that domain", 1522 'class_has_files' => "Class still has files, u anble to delete",1522 'class_has_files' => "Class still has files, unable to delete", 1523 1523 'class_not_found' => "Class not found", 1524 1524 'db' => "Database error", 1525 'domain_has_files' => "Domain still has files, u anble to delete",1525 'domain_has_files' => "Domain still has files, unable to delete", 1526 1526 'domain_exists' => "That domain already exists", 1527 1527 'domain_not_empty' => "Domain still has classes, unable to delete", -
trunk/server/lib/MogileFS/Worker/Replicate.pm
r1147 r1198 250 250 return 0 unless $sto->isa("MogileFS::Store::MySQL"); 251 251 252 # call this $mdbh to indic iate it's a MySQL dbh, and to help grepping252 # call this $mdbh to indicate it's a MySQL dbh, and to help grepping 253 253 # for old handles. :) 254 254 my $mdbh = $sto->dbh; … … 401 401 # case where file is in file_on because not yet deleted, but 402 402 # has been replaced/deleted in 'file' table...). not too harmful 403 # (just no siy) if thiseline didn't exist, but whatever... it403 # (just noisy) if this line didn't exist, but whatever... it 404 404 # makes stuff cleaner on my intentionally-corrupted-for-fsck-testing 405 405 # dev machine... … … 434 434 # nothing to do, even with this devfid masked away. 435 435 # so let's figure it out... if this devfid still exists, 436 # we're over replicated, else we just lost the race.436 # we're over-replicated, else we just lost the race. 437 437 if ($devfid->exists) { 438 438 # over-replicated … … 597 597 last if $rr->is_happy; 598 598 599 my @ddevs; # dest devs, in order of prefer rence599 my @ddevs; # dest devs, in order of preference 600 600 my $ddevid; # dest devid we've chosen to copy to 601 601 if (@ddevs = $rr->copy_to_one_of_ideally) { -
trunk/server/lib/Mogstored/SideChannelClient.pm
r975 r1198 94 94 } 95 95 96 # stop watching writ ability if we've nothing else to96 # stop watching writeability if we've nothing else to 97 97 # write to them. else just kick off more writes. 98 98 sub event_write { -
trunk/server/mogautomount
r1137 r1198 113 113 0 on success or inaction because no action needed to happen. 114 114 115 1 on partial failure (some mounts succee ed).115 1 on partial failure (some mounts succeed). 116 116 117 117 2 on total failure (things had to be done, but nothing was). -
trunk/server/mogilefsd
r1082 r1198 103 103 =head1 SEE ALSO 104 104 105 L<mogstored> -- Mogile fS storage daemon105 L<mogstored> -- MogileFS storage daemon 106 106 107 107 L<http://danga.com/mogilefs/> -
trunk/server/mogstored
r1115 r1198 169 169 170 170 # parse the mogstored config file, which is just lines of comments and 171 # "key = value" lines, where keys are just the same as command line171 # "key = value" lines, where keys are just the same as command line 172 172 # options. 173 173 die "Config file $opt_config doesn't exist.\n" unless -e $conffile; … … 214 214 }); 215 215 216 # old Gearman::Servers didn't return pid intege gers216 # old Gearman::Servers didn't return pid integers 217 217 if ($pid =~ /^\d+$/) { 218 218 Mogstored->on_pid_death($pid, \&start_fidsizes_worker); -
trunk/server/t/10-weighting.t
r1169 r1198 12 12 $ENV{TESTING} = 1; 13 13 $ENV{T_FAKE_IO_DEV1} = 95; # Simulating high device load (should get fewer requests). 14 $ENV{T_FAKE_IO_DEV2} = 5; # Simulating low device load (shou dld get more requests).14 $ENV{T_FAKE_IO_DEV2} = 5; # Simulating low device load (should get more requests). 15 15 } 16 16 -
trunk/server/t/20-filepaths.t
r1169 r1198 24 24 # etc 25 25 26 plan skip_all => "Filepaths plugin has been sep erated from the server, a bit of work is needed to make the tests run again.";26 plan skip_all => "Filepaths plugin has been separated from the server, a bit of work is needed to make the tests run again."; 27 27 exit 0; 28 28 -
trunk/server/t/mogstored-shutdown.t
r1169 r1198 66 66 sub exist_pid { 67 67 unless (`netstat -nap --inet` =~ m!127\.0\.1\.1:750[10].+LISTEN\s+(\d+)/!) { 68 die "Could 't find pid of daemonized process.\n";68 die "Couldn't find pid of daemonized process.\n"; 69 69 } 70 70 return $1; -
trunk/server/t/multiple-hosts-replpol.t
r1169 r1198 21 21 "ideal(3,4)", "need host2"); 22 22 23 # still needs to be on host2, even though 2 co ies on host123 # still needs to be on host2, even though 2 copies on host1 24 24 is(rr("min=2 h1[d1=X d2=X] h2[d3=_ d4=_]"), 25 25 "ideal(3,4)", "need host2, even though 2 on host1"); -
trunk/utils/debian/control
r168 r1198 9 9 Architecture: all 10 10 Depends: ${perl:Depends}, libcompress-zlib-perl, libwww-perl, libmogilefs-perl 11 Description: utilities to manipulate mogileFS filesystems11 Description: utilities to manipulate MogileFS filesystems 12 12 The mogilefs-utils package contains tools to administrate and work with the 13 mogileFS filesystem from Danga Interactive.13 MogileFS filesystem from Danga Interactive. -
trunk/utils/mogadm
r1136 r1198 113 113 }, 114 114 modify => { 115 des => "Modify a device's proper eties.",115 des => "Modify a device's properties.", 116 116 args => "<hostname> <devid> [opts]", 117 117 opts => { … … 119 119 "<devid>" => "Numeric devid to modify.", 120 120 "--status=s" => "One of {alive,dead,down,drain,readonly}", 121 "--weight=i" => "Pos tive numeric weight for device",121 "--weight=i" => "Positive numeric weight for device", 122 122 }, 123 123 }, … … 158 158 "<domain>" => "Domain to add class to.", 159 159 "<class>" => "Name of class to add.", 160 "--mindevcount=i" => "Mini num number of replicas.",160 "--mindevcount=i" => "Minimum number of replicas.", 161 161 }, 162 162 }, … … 167 167 "<domain>" => "Domain to add class to.", 168 168 "<class>" => "Name of class to add.", 169 "--mindevcount=i" => "Mini num number of replicas.",169 "--mindevcount=i" => "Minimum number of replicas.", 170 170 }, 171 171 }, … … 1448 1448 Show the status of the presently active (or last if none active) fsck. This 1449 1449 includes what FIDs are being checked, time statistics, check type as well as a 1450 summary of problems encounte d so far.1450 summary of problems encountered so far. 1451 1451 1452 1452 =item B<fsck stop> -
trunk/utils/mogtool
r1130 r1198 281 281 =item 0 282 282 283 Suc ess during operation.283 Success during operation. 284 284 285 285 =item 1 … … 289 289 =item 2 290 290 291 Some fatal error occur ed.291 Some fatal error occurred. 292 292 293 293 =back … … 1170 1170 } 1171 1171 1172 # several cases.. going to stdout?1172 # several cases.. going to STDOUT? 1173 1173 if ($dest eq '-') { 1174 1174 *O = *STDOUT; … … 1183 1183 } 1184 1184 if (-b $dest) { 1185 # if we're target ting a block device...1185 # if we're targeting a block device... 1186 1186 warn "FIXME: add in block checking\n"; 1187 1187 open O, ">$dest" … … 1239 1239 # now make sure we have enough data 1240 1240 #$ mogtool [opts] extract <key> {<file>,<dir>,<device>} 1241 #=> - (for stdout) (if compressed, add "z" flag)1241 #=> - (for STDOUT) (if compressed, add "z" flag) 1242 1242 #=> . (to untar) (if compressed, do nothing???, make .tar.gz file -- unless they use -z again?) 1243 1243 #=> /dev/sda4 (but check /proc/partitions that it's big enough) (if compress, Compress::Zlib to ungzip … … 1258 1258 $dkey = "_big_info:$key" if $opts{big}; 1259 1259 1260 # list all path es for the file1260 # list all paths for the file 1261 1261 my $ct = 0; 1262 1262 my @paths = []; … … 1303 1303 abortWithUsage("key pattern required") unless $key_pattern; 1304 1304 1305 # list all files matchin ea key1305 # list all files matching a key 1306 1306 my ($ct, $after, $list); 1307 1307 $ct = 0; … … 1417 1417 1418 1418 $ mogtool [opts] extract <key> {<file>,<dir>,<device>} 1419 => - (for stdout) (if compressed, add "z" flag)1419 => - (for STDOUT) (if compressed, add "z" flag) 1420 1420 => . (to untar) (if compressed, do nothing???, make .tar.gz file -- unless they use -z again?) 1421 1421 => /dev/sda4 (but check /proc/partitions that it's big enough) (if compress, Compress::Zlib to ungzip)
