IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 21, 2008, 6:10:01 PM (18 years ago)
Author:
jhoblitt
Message:

fixes!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm

    r17077 r17772  
    11# Copyright (c) 2004  Joshua Hoblitt
    22#
    3 # $Id: SQL.pm,v 1.50 2008-03-21 01:24:36 jhoblitt Exp $
     3# $Id: SQL.pm,v 1.51 2008-05-22 04:10:01 jhoblitt Exp $
    44
    55package Nebulous::Server::SQL;
     
    250250            count(ins_id) as instances,
    251251            count(mountedvol.vol_id) as available_instances,
    252             count(mountedvol.vol_id) < count(ins_id) as need_recovery,
    253252            count(mountedvol.vol_id) > 0 as recoverable,
    254253            storage_object_xattr.value as copies
    255254        FROM storage_object
    256         JOIN storage_object_attr
    257             USING(so_id)
    258255        JOIN instance
    259256            USING(so_id)
    260257        LEFT JOIN storage_object_xattr
    261258            ON storage_object.so_id = storage_object_xattr.so_id
    262             AND storage_object_xattr.name = 'copies'
    263         LEFT JOIN mountedvol
     259        JOIN mountedvol
    264260            USING(vol_id)
     261--        WHERE storage_object_xattr.name = 'user.copies'
    265262        GROUP BY so_id
    266         HAVING need_recovery = 1
    267     },
    268     get_mounted_volumes => qq{
    269         SELECT * FROM mountedvol ORDER BY vol_id
     263        HAVING available_instances < instances OR instances != copies
    270264    },
    271265);
Note: See TracChangeset for help on using the changeset viewer.