MogileFS-Server

 view release on metacpan or  search on metacpan

CHANGES  view on Meta::CPAN

   * store: wrap create_class in a transaction to avoid races (Eric Wong <normalperson@yhbt.net>)

   * mogstored: fix kqueue usage with daemonization (Eric Wong <normalperson@yhbt.net>)

   * Filter the devices before we do an expensive sort. (Dave Lambley <davel@state51.co.uk>)

   * httpfile: avoid killing worker on down sidechannel (Eric Wong <normalperson@yhbt.net>)

   * move checksum and tempfile delete to delete worker (Eric Wong <normalperson@yhbt.net>)

   * sqlite: use immediate transactions to prevent busy errors (Eric Wong <normalperson@yhbt.net>)

   * disable Nagle's algorithm for accepted clients (Eric Wong <normalperson@yhbt.net>)

   * ProcManager: favor using recently-used queryworkers (Eric Wong <normalperson@yhbt.net>)

   * Do both sorts in one method, to save on shared initialisation. (Dave Lambley <davel@state51.co.uk>)

   * Pull out device sorting into it's own method for overriding. (Dave Lambley <davel@state51.co.uk>)

   * Reseed the random number generator after forking. (Dave Lambley <davel@state51.co.uk>)

CHANGES  view on Meta::CPAN

        * Fix dependencies in MogileFS::Server (t0m)

        * Fix bug in list_keys command that prevented searches with a
          '0' prefix. (Ask Bjørn Hansen)

2009-12-05: Release version 2.34

        * Fix bug in new copycount reduction code. If it was more than off by
          one it wouldn't reduce the count properly.

        * Improve accept loop. A reasonably busy tracker could start dropping
          new client connections too easily.

2009-11-24: Release version 2.33

        * 'mogadm fsck status' will now be more accurate.

        * Support non-GNU df (paul armstrong)

        * Remove old !replication command. It's in `mogadm stats` and tends
          to kill the parent process.

lib/MogileFS/ConnectionPool.pm  view on Meta::CPAN


# retrieves a connection from the connection pool and executes
# inflight_cb on it.  If the pool is at capacity, this will queue the task.
# This relies on Danga::Socket->EventLoop
sub start {
    my ($self, $ip, $port, $inflight_cb) = @_;

    my $conn = $self->_conn_get($ip, $port);
    if ($conn) {
        $self->_conn_run($conn, $inflight_cb);
    } else { # we're too busy right now, queue up
        $self->enqueue($ip, $port, $inflight_cb);
    }
}

# returns the total number of connections we have
sub _total_connections {
    my ($self) = @_;
    return scalar keys %{$self->{fdmap}};
}

lib/MogileFS/Store/SQLite.pm  view on Meta::CPAN

use MogileFS::Util qw(throw);
use base 'MogileFS::Store';
use File::Temp ();

# --------------------------------------------------------------------------
# Package methods we override
# --------------------------------------------------------------------------

sub post_dbi_connect {
    my $self = shift;
    $self->{dbh}->func(5000, 'busy_timeout');
    $self->{lock_depth} = 0;
}

sub want_raise_errors { 1 }

sub dsn_of_dbhost {
    my ($class, $dbname, $host) = @_;
    return "DBI:SQLite:$dbname";
}



( run in 0.273 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )