IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 20, 2008, 11:13:28 AM (18 years ago)
Author:
jhoblitt
Message:

server/client split

File:
1 edited

Legend:

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

    r16282 r17072  
    11# Copyright (c) 2004  Joshua Hoblitt
    22#
    3 # $Id: SQL.pm,v 1.48 2008-02-02 02:10:52 jhoblitt Exp $
     3# $Id: SQL.pm,v 1.49 2008-03-20 21:10:57 jhoblitt Exp $
    44
    55package Nebulous::Server::SQL;
     
    246246    find_objects_with_unavailable_instances => qq{
    247247        SELECT
    248             so_id,
     248            storage_object.so_id,
    249249            ext_id,
    250250            count(ins_id) as instances,
    251251            count(mountedvol.vol_id) as available_instances,
    252252            count(mountedvol.vol_id) < count(ins_id) as need_recovery,
    253             count(mountedvol.vol_id) > 0 as recoverable
     253            count(mountedvol.vol_id) > 0 as recoverable,
     254            storage_object_xattr.value as copies
    254255        FROM storage_object
    255256        JOIN storage_object_attr
    256257            USING(so_id)
    257         JOIN storage_object_xattr
     258        JOIN instance
     259            USING(so_id)
     260        LEFT JOIN storage_object_xattr
    258261            ON storage_object.so_id = storage_object_xattr.so_id
    259262            AND storage_object_xattr.name = 'copies'
    260         JOIN instance
    261             USING(so_id)
    262263        LEFT JOIN mountedvol
    263264            USING(vol_id)
Note: See TracChangeset for help on using the changeset viewer.