IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 9, 2008, 1:27:44 PM (18 years ago)
Author:
jhoblitt
Message:

change find_objects_with_unavailable_instances query to work on a temporary table instead of directly on the mountedvol table

File:
1 edited

Legend:

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

    r20023 r20030  
    11# Copyright (c) 2004  Joshua Hoblitt
    22#
    3 # $Id: SQL.pm,v 1.70 2008-10-09 21:30:10 jhoblitt Exp $
     3# $Id: SQL.pm,v 1.71 2008-10-09 23:27:44 jhoblitt Exp $
    44
    55package Nebulous::Server::SQL;
     
    293293            volume.name as volume_name,
    294294            volume.host as volume_host,
    295             count(mountedvol.vol_id) as available_instances,
    296             count(mountedvol.vol_id) > 0 as recoverable,
     295            count(mymountedvol.vol_id) as available_instances,
     296            count(mymountedvol.vol_id) > 0 as recoverable,
    297297            storage_object_xattr.value as copies
    298298        FROM storage_object
     
    303303        LEFT JOIN storage_object_xattr
    304304            ON storage_object.so_id = storage_object_xattr.so_id
    305         JOIN mountedvol
     305        JOIN mymountedvol
    306306            USING(vol_id)
    307         WHERE mountedvol.available = 1
     307        WHERE mymountedvol.available = 1
    308308--        WHERE storage_object_xattr.name = 'user.copies'
    309309        GROUP BY so_id
Note: See TracChangeset for help on using the changeset viewer.