Changeset 23726
- Timestamp:
- Apr 7, 2009, 1:50:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/neb_distrib_20081210/Nebulous-Server/lib/Nebulous/Server.pm
r23725 r23726 67 67 # EAM : In the 'distributed' version of Nebulous, there is a collection of N databases 68 68 # the db_index uniquely defines the db used by a given key 69 sub db_index_for_key69 sub _db_index_for_key 70 70 { 71 71 my ($self, $key) = @_; … … 87 87 } 88 88 89 sub db_for_index89 sub _db_for_index 90 90 { 91 91 my ($self, $db_index) = @_; … … 158 158 159 159 die "key not defined" unless defined $key; 160 my $db_index = $self-> db_index_for_key($key);161 162 my $dbh = $self-> db_for_index($db_index);160 my $db_index = $self->_db_index_for_key($key); 161 162 my $dbh = $self->_db_for_index($db_index); 163 163 return $dbh; 164 164 } … … 385 385 my $sql = $self->sql; 386 386 387 my $dbidx1 = $self-> db_index_for_key($key1);388 my $dbidx2 = $self-> db_index_for_key($key2);387 my $dbidx1 = $self->_db_index_for_key($key1); 388 my $dbidx2 = $self->_db_index_for_key($key2); 389 389 die "cannot swap keys not stored on the same database" unless ($dbidx1 == $dbidx2); 390 390 391 my $dbh1 = $self-> db_for_index($dbidx1);392 my $dbh2 = $self-> db_for_index($dbidx2);391 my $dbh1 = $self->_db_for_index($dbidx1); 392 my $dbh2 = $self->_db_for_index($dbidx2); 393 393 die "different db handles for the same db?" unless ($dbh1 == $dbh2); 394 394 … … 1121 1121 my $log = $self->log; 1122 1122 my $sql = $self->sql; 1123 my $db = $self-> db_for_index($index);1123 my $db = $self->_db_for_index($index); 1124 1124 1125 1125 my @keys; … … 1384 1384 my $log = $self->log; 1385 1385 my $sql = $self->sql; 1386 my $db = $self-> db_for_index(0); # XXX fix as above1386 my $db = $self->_db_for_index(0); # XXX fix as above 1387 1387 1388 1388 $log->debug("entered - @_");
Note:
See TracChangeset
for help on using the changeset viewer.
