Changeset 20030
- Timestamp:
- Oct 9, 2008, 1:27:44 PM (18 years ago)
- Location:
- trunk/Nebulous-Server
- Files:
-
- 3 edited
-
Changes (modified) (1 diff)
-
bin/neb-admin (modified) (2 diffs)
-
lib/Nebulous/Server/SQL.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/Changes
r20023 r20030 23 23 level locks being set by a cursor 24 24 - drop instance.sha1sum and instance.assigned_vol_id 25 - change find_objects_with_unavailable_instances query to work on a 26 temporary table instead of directly on the mountedvol table 25 27 26 28 0.15 Thu Sep 11 13:00:59 HST 2008 -
trunk/Nebulous-Server/bin/neb-admin
r19790 r20030 3 3 # Copyright (C) 2005-2008 Joshua Hoblitt 4 4 # 5 # $Id: neb-admin,v 1. 9 2008-09-30 21:55:44 jhoblitt Exp $5 # $Id: neb-admin,v 1.10 2008-10-09 23:27:44 jhoblitt Exp $ 6 6 7 7 use strict; … … 70 70 71 71 # so_id, ext_id, instances, available_instances, need_recovery, recoverable 72 { 73 my $query = $dbh->prepare("CREATE TEMPORARY TABLE mymountedvol LIKE mountedvol"); 74 $query->execute; 75 } 76 77 { 78 my $query = $dbh->prepare("INSERT INTO mymountedvol SELECT * FROM mountedvol"); 79 $query->execute; 80 } 81 72 82 my $query = $dbh->prepare( $sql->find_objects_with_unavailable_instances 73 83 . " LIMIT $limit" ); 74 84 $query->execute; 85 86 $dbh->do("DROP TABLE IF EXISTS mymountedvol"); 75 87 76 88 my @rows; -
trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm
r20023 r20030 1 1 # Copyright (c) 2004 Joshua Hoblitt 2 2 # 3 # $Id: SQL.pm,v 1.7 0 2008-10-09 21:30:10jhoblitt Exp $3 # $Id: SQL.pm,v 1.71 2008-10-09 23:27:44 jhoblitt Exp $ 4 4 5 5 package Nebulous::Server::SQL; … … 293 293 volume.name as volume_name, 294 294 volume.host as volume_host, 295 count(m ountedvol.vol_id) as available_instances,296 count(m ountedvol.vol_id) > 0 as recoverable,295 count(mymountedvol.vol_id) as available_instances, 296 count(mymountedvol.vol_id) > 0 as recoverable, 297 297 storage_object_xattr.value as copies 298 298 FROM storage_object … … 303 303 LEFT JOIN storage_object_xattr 304 304 ON storage_object.so_id = storage_object_xattr.so_id 305 JOIN m ountedvol305 JOIN mymountedvol 306 306 USING(vol_id) 307 WHERE m ountedvol.available = 1307 WHERE mymountedvol.available = 1 308 308 -- WHERE storage_object_xattr.name = 'user.copies' 309 309 GROUP BY so_id
Note:
See TracChangeset
for help on using the changeset viewer.
