[Bps-public-commit] r11577 - in SVN-PropDB: .

jesse at bestpractical.com jesse at bestpractical.com
Sun Apr 6 00:22:47 EDT 2008


Author: jesse
Date: Sun Apr  6 00:22:40 2008
New Revision: 11577

Modified:
   SVN-PropDB/   (props changed)
   SVN-PropDB/lib/Prophet/Replica.pm

Log:
 r29358 at 31b:  jesse | 2008-04-05 18:19:59 -1000
 * start of support for stopping mistaken commits between replicas with different database uuids


Modified: SVN-PropDB/lib/Prophet/Replica.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Replica.pm	(original)
+++ SVN-PropDB/lib/Prophet/Replica.pm	Sun Apr  6 00:22:40 2008
@@ -350,9 +350,20 @@
 
 =cut
 
+sub db_uuid {
+    my $self = shift;
+    return undef unless ($self->can('prophet_handle'));
+    return $self->prophet_handle->db_uuid;
+
+}
+
 sub new_changesets_for {
     my $self = shift;
     my (  $other ) = validate_pos(@_, { isa => 'Prophet::Replica'});
+    if ($self->db_uuid && $other->db_uuid && $self->db_uuid ne $other->db_uuid) {
+        warn "HEY. You should not be merging between two replicas with different database uuids";
+
+    }
 
     return [ 
         grep { $self->should_send_changeset( changeset => $_, to => $other ) }



More information about the Bps-public-commit mailing list