Changeset 20175 for trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm
- Timestamp:
- Oct 15, 2008, 10:45:51 AM (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
r20155 r20175 1 1 # Copyright (c) 2004 Joshua Hoblitt 2 2 # 3 # $Id: SQL.pm,v 1.7 4 2008-10-15 01:56:00jhoblitt Exp $3 # $Id: SQL.pm,v 1.75 2008-10-15 20:45:51 jhoblitt Exp $ 4 4 5 5 package Nebulous::Server::SQL; … … 324 324 HAVING available_instances < instances OR instances < copies 325 325 }, 326 find_objects_with_extra_instances => qq{ 327 SELECT 328 storage_object.so_id, 329 ext_id, 330 count(ins_id) as instances, 331 volume.name as volume_name, 332 volume.host as volume_host, 333 count(mymountedvol.vol_id) as available_instances, 334 count(mymountedvol.vol_id) > 0 as recoverable, 335 storage_object_xattr.value as copies 336 FROM storage_object 337 JOIN instance 338 USING(so_id) 339 JOIN volume 340 USING(vol_id) 341 LEFT JOIN storage_object_xattr 342 ON storage_object.so_id = storage_object_xattr.so_id 343 JOIN mymountedvol 344 USING(vol_id) 345 WHERE 346 mymountedvol.available = 1 347 AND storage_object_xattr.name = 'user.copies' 348 GROUP BY so_id 349 HAVING available_instances > copies 350 }, 326 351 get_mounted_volumes => qq{ 327 SELECT * FROM mountedvol ORDER BY vol_id352 SELECT * FROM mountedvol ORDER BY host, name 328 353 }, 329 354 );
Note:
See TracChangeset
for help on using the changeset viewer.
