Changeset 17772
- Timestamp:
- May 21, 2008, 6:10:01 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm
r17077 r17772 1 1 # Copyright (c) 2004 Joshua Hoblitt 2 2 # 3 # $Id: SQL.pm,v 1.5 0 2008-03-21 01:24:36jhoblitt Exp $3 # $Id: SQL.pm,v 1.51 2008-05-22 04:10:01 jhoblitt Exp $ 4 4 5 5 package Nebulous::Server::SQL; … … 250 250 count(ins_id) as instances, 251 251 count(mountedvol.vol_id) as available_instances, 252 count(mountedvol.vol_id) < count(ins_id) as need_recovery,253 252 count(mountedvol.vol_id) > 0 as recoverable, 254 253 storage_object_xattr.value as copies 255 254 FROM storage_object 256 JOIN storage_object_attr257 USING(so_id)258 255 JOIN instance 259 256 USING(so_id) 260 257 LEFT JOIN storage_object_xattr 261 258 ON storage_object.so_id = storage_object_xattr.so_id 262 AND storage_object_xattr.name = 'copies' 263 LEFT JOIN mountedvol 259 JOIN mountedvol 264 260 USING(vol_id) 261 -- WHERE storage_object_xattr.name = 'user.copies' 265 262 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 270 264 }, 271 265 );
Note:
See TracChangeset
for help on using the changeset viewer.
